Commit Graph
416 Commits
Author SHA1 Message Date
Kurdistan Tech MinistryandClaude Sonnet 4.6 c458686071 ci: retry check-toml-format and cargo-deny-licenses on stuck/timeout
Both jobs occasionally get stuck on unstable runners with no output
for 40-50+ minutes (empty log, runner preparing phase freeze). Without
explicit retry, they fail the pipeline with stuck_or_timeout_failure.

retry: max: 1, when: stuck_or_timeout_failure retries only on genuine
runner freezes, not on taplo format errors or license violations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:26:07 +03:00
Kurdistan Tech MinistryandClaude Sonnet 4.6 07f7a5b442 ci(clippy): revert persistent CARGO_TARGET_DIR, keep CARGO_HOME fix
librocksdb-sys debug build writes a multi-GB librocksdb.a static archive
to /cache/cargo-target, filling the volume and causing build failure.
Persistent cache is not safe for C++ heavy dependencies.

Keep CARGO_HOME=/root/.cargo (avoids re-downloading the Rust crate
registry on every run). CARGO_TARGET_DIR stays ephemeral (Docker
container fs has ample space).

Timeout stays at 3h to cover cold builds on slower runners.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 11:34:06 +03:00
Kurdistan Tech MinistryandClaude Sonnet 4.6 9e5cf4e833 ci(clippy): persistent cache + pre-baked registry for fast warm builds
Two root causes for clippy taking 100+ minutes on cold runners:
1. CARGO_HOME=$CI_PROJECT_DIR/.cargo (global default) is wiped each job,
   forcing re-download of the entire crate registry on every run.
   Fix: override CARGO_HOME=/root/.cargo (pre-baked in the CI image).
2. CARGO_TARGET_DIR not persisted — compiled artifacts discarded after
   each run, forcing full recompile on the same runner.
   Fix: same /cache/cargo-target/$CACHE_KEY/clippy setup as test jobs.

First run on a fresh runner: still slow (~100m, cold compile).
Subsequent runs on same runner: ~10-15m (warm cache reuse).
Timeout bumped to 3h to safely cover the cold-build case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 03:37:12 +03:00
Kurdistan Tech MinistryandClaude Sonnet 4.6 b13009b415 ci: retry test jobs once on runner_system_failure
VPS2 Docker daemon crashed mid-run, killing test-partition-1/2 and
leaving wasm-check/test-no-try-runtime-2 with 404 exec errors. None
of these were test failures — all were runner infrastructure failures.

retry: max: 1, when: runner_system_failure retries only on runner
crashes, never on actual test failures. Correct safeguard for
multi-runner setups where any VPS can restart unexpectedly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 01:52:23 +03:00
Kurdistan Tech MinistryandClaude Sonnet 4.6 73e5bfea3e fix(ci): retry cargo-deny-advisories on transient network failure
advisory-db is cloned from GitHub (rustsec/advisory-db). The runner
(merkez-server) occasionally fails to reach GitHub — the clone fails
silently, the advisory-dbs/ directory is not created, and cargo-deny
then tries to run git-log on a non-existent path, producing:
  'fatal: cannot change to ...' parsed as an ISO-8601 date → crash

Real fix: GitLab native retry (max: 2, when: script_failure).
This retries the full job on infrastructure failures without bypassing
the security check — if all 3 attempts fail, the job still fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 22:10:40 +03:00
Kurdistan Tech MinistryandClaude Sonnet 4.6 7a20770f63 fix(ci): fix test-partition timeouts and wasm-check arrayvec failure
Two root causes fixed:

1. test-partition-* timeout (90m):
   - WASM runtime sub-builds were running during test compilation.
     SKIP_WASM_BUILD=1 skips them — unit/integration tests use mock
     environments and don't need actual WASM blobs.
   - WASM_BUILD_WORKSPACE_HINT=$CI_PROJECT_DIR: when CARGO_TARGET_DIR is
     outside the project directory, wasm-builder's build script searches
     upward for Cargo.lock and fails to find it. Without Cargo.lock it
     resolves deps fresh (no --locked), selecting alloy-eips@1.8.3 and
     ruint@1.18.0 which require Rust 1.91/1.90 (toolchain is 1.88).
   - Timeout increased 90m → 150m for cold-cache headroom.

2. wasm-check arrayvec compile failure (197 errors):
   cargo check --target wasm32v1-none uses whole-workspace feature
   unification, which enables arrayvec's std feature. wasm32v1-none is
   a bare-metal target with no libstd, so arrayvec must be no_std there.
   Fixed in arrayvec fork: force no_std when
   target_arch=wasm32 && target_os=none, regardless of feature flags.
   Cargo.lock updated to new arrayvec commit (0c417574).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:57:28 +03:00
Kurdistan Tech MinistryandClaude Sonnet 4.6 fd36770895 fix(ci): consolidate check-try-runtime into single superset command
Three sequential cargo check commands were causing a 90m timeout on GitLab
shared runners (no persistent target/ cache). Command 3 (try-runtime,experimental)
is a strict superset of commands 1 and 2:
- cmd 1: --all --features try-runtime → redundant, cmd 3 covers it
- cmd 2: -p teyrchain-template-node --features try-runtime → redundant,
  teyrchain-template-node is in the workspace (templates/teyrchain/node)
  so --all already includes it

Keep only the most comprehensive check. Increase timeout to 120m to give the
single compile sufficient headroom on shared runners (~60-70m observed).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 16:39:57 +03:00
Kurdistan Tech Ministry e5802599f3 chore: reformat Cargo.toml with taplo 0.9.3 (CI version) 2026-04-25 05:48:52 +03:00
Kurdistan Tech Ministry 90aa6f5350 fix: patch core2 0.4.0 via git mirror to unblock wasm sub-build resolution
core2 0.4.0 was yanked from crates.io. Wasm runtime builds invoke cargo
as a subprocess without --locked, causing fresh dependency resolution to
fail when selecting core2 ^0.4 (no non-yanked version available).

The dependency path: pezsc-network -> cid v0.9.0 -> core2 ^0.4

Adding a git mirror at git.pezkuwichain.io/pezkuwichain/core2 as a
workspace [patch.crates-io] entry. The wasm-builder propagates workspace
patches to the generated wbuild Cargo.toml, so the sub-build resolves
core2 from the git source instead of the yanked crates.io version.
2026-04-25 05:46:20 +03:00
Kurdistan Tech Ministry 45b58174c0 fix(readme): replace all GitHub links with Gitea/GitLab equivalents
GitHub repo was DMCA-taken-down. All links updated:
- Clone URL: github.com → git.pezkuwichain.io
- Badges: GitHub stats → GitLab equivalents via shields.io
- GitHub Pages rustdoc URLs → GitLab Pages (pezkuwichain.gitlab.io)
- getting-started.sh: raw.githubusercontent.com → gitlab.com raw
- Release badges pointing to dead GitHub release-registry → removed
- psvm, pezkuwi-fellows, mentor issues: github.com → git.pezkuwichain.io
- License section: lists all 4 licenses now present in the repo

Also updated license section to reflect all 4 licenses:
Apache-2.0, GPL-3.0-or-later WITH Classpath-exception-2.0, MIT-0, Unlicense
2026-04-25 02:31:30 +03:00
Kurdistan Tech Ministry 6ee99cc5ba fix(license): proper license compliance across the repository
Critical issues fixed:

1. Workspace Cargo.toml license: GPL-3.0-only → GPL-3.0-or-later WITH
   Classpath-exception-2.0 to match the SPDX-License-Identifier headers
   in 648 source files. These are legally distinct licenses — GPL-3.0-only
   prohibits use of future GPL versions; GPL-3.0-or-later WITH
   Classpath-exception-2.0 permits linking without contaminating linked
   code (critical for WASM runtime use case).

2. Add LICENSE-MIT0: 32 source files declare MIT-0 (pezframe examples)
   but no license text existed in the repository.

3. Add LICENSE-UNLICENSE: 9 source files declare Unlicense (penpal test
   runtime) but no license text existed.

4. Add SPDX-License-Identifier headers to 150 crate_placeholder source
   files. These crates explicitly declare Apache-2.0 in Cargo.toml but
   had no license headers in their .rs files.

5. Fix repository URL: GitHub URL was DMCA-taken-down; updated to
   git.pezkuwichain.io canonical URL.

Root cause of GitHub DMCA: inconsistent license declarations make it
ambiguous whether Apache-2.0 upstream code was properly attributed.
All four license texts (Apache-2.0, GPL-3, MIT-0, Unlicense) are now
present and every source file has a corresponding SPDX header.
2026-04-25 02:07:08 +03:00
Kurdistan Tech Ministry 9406efbcd6 Add LICENSE file for GitLab/GitHub license detection
Primary license is GPL-3.0-only per Cargo.toml workspace config.
LICENSE-GPL3 already existed; this adds the standard LICENSE filename
that repository hosting platforms use for automatic detection.
2026-04-25 01:57:58 +03:00
Kurdistan Tech Ministry c4d47da770 fix(ci): use git diff --quiet instead of git status for umbrella check
git status --porcelain also reports untracked files — cargo install zepter
writes .cargo/ inside the project dir on shared GitLab runners, causing
false positives. git diff --quiet only checks tracked file changes.
2026-04-25 01:37:12 +03:00
Kurdistan Tech Ministry 2bd0f4ce47 debug(ci): show changed files and diff in check-umbrella failure 2026-04-25 01:29:07 +03:00
Kurdistan Tech Ministry 3ac8a1bc80 fix(ci): use zepter run default to propagate umbrella features
'propagate-features' is not a valid zepter workflow. The correct workflow
is 'default' which runs propagate-feature --fix for workspace + umbrella.
Since check-zepter validates workspace cleanliness first, the workspace
step is a no-op — only umbrella feature lists get populated by Zepter.
2026-04-25 00:18:27 +03:00
Kurdistan Tech Ministry 2bbe41e97d fix(ci): complete umbrella check with zepter propagate-features
Generator intentionally emits empty feature lists (filled by Zepter).
Without running propagate-features after generate, diff always exists.
Add zepter run propagate-features step so check reflects actual state.
2026-04-24 23:59:59 +03:00
Kurdistan Tech Ministry 5d1cbbac15 Update Cargo.lock for arrayvec git patch 2026-04-24 23:36:18 +03:00
Kurdistan Tech Ministry 05c31c9ee9 Patch arrayvec 0.7.6 for wasm32v1-none compatibility
arrayvec 0.7.6 fails to compile on wasm32v1-none (Rust 1.87+):
- E0223: Self::Target/Self::IntoIter ambiguous due to Receiver trait
- char.rs: Ok/Err/Result not in scope (prelude not injected on target_os=none)

Fork at git.pezkuwichain.io/pezkuwichain/arrayvec fixes both issues.
2026-04-24 23:34:27 +03:00
Kurdistan Tech Ministry a88c024e38 fix(ci): taplo-format Cargo.toml after alloy/ruint version pins 2026-04-24 22:44:56 +03:00
Kurdistan Tech Ministry 1d69ab5416 fix(deps): pin alloy-eips, alloy-tx-macros, ruint to Rust 1.88-compatible versions
The wasm-builder creates an inner workspace (wbuild/) without a Cargo.lock,
causing it to resolve to latest alloy-eips 1.8.3 (requires Rust 1.91) and
ruint 1.18.0 (requires Rust 1.90). Pin to the same exact versions already
in Cargo.lock (alloy-eips/alloy-tx-macros =1.5.2, ruint =1.17.2).
2026-04-24 22:28:16 +03:00
Kurdistan Tech Ministry 4c465efba3 ci: fix cargo-target volume path (/var/cache → /cache)
/var/cache is not bind-mountable by Docker on VPS2 (filesystem restriction).
/cache is already a persistent volume and works correctly.
2026-04-24 17:41:13 +03:00
Kurdistan Tech Ministry b99f16f934 ci: route test jobs to self-hosted runner with persistent CARGO_TARGET_DIR
- Add tags: [pezkuwi-runner] to .test-base, wasm-check, test-doc
- Set CARGO_TARGET_DIR to /var/cache/cargo-target/<hash>/<job-name> on VPS2
- Hash is md5(Cargo.lock + rust-toolchain.toml) — auto-deletes old keys
- Set CARGO_HOME: /root/.cargo (persistent volume, skip GitLab cache upload)
- Disable GitLab registry cache for self-hosted jobs (cache: [])
- Fix basic-authorship doc test: mark as no_run (requires compiled WASM at runtime)
2026-04-24 17:24:34 +03:00
Kurdistan Tech Ministry 578190da50 ci: install wasm32v1-none target globally, migrate wasm-check to wasm32v1-none
wasm32-unknown-unknown with build-std=core,alloc on Rust >=1.88 now ships
a pre-built std in the sysroot, causing E0152 duplicate core lang items when
serde_core is compiled. Switching to wasm32v1-none (target_os=none, no sysroot
std) eliminates the conflict. Also fixes wasm-check getrandom compile_error
which only triggers on wasm*-unknown-unknown, not wasm32v1-none.
2026-04-24 00:59:18 +03:00
Kurdistan Tech Ministry 418c6c92d7 ci: remove stale target/ cache that caused E0152 duplicate lang item
target-main cache key doesn't invalidate on Cargo.lock changes, so
pre-fix serde_core compiled artifacts were restored into test builds,
reintroducing duplicate alloc lang items after the serde fork fix.
2026-04-23 19:34:59 +03:00
Kurdistan Tech Ministry f1f3f46e30 ci: increase clippy timeout to 2h and cache target/ for incremental speedup 2026-04-23 15:42:39 +03:00
Kurdistan Tech Ministry 9ada06798d ci: retrigger after serde cache warmup 2026-04-23 13:39:31 +03:00
Kurdistan Tech Ministry a58ad37b78 fix(deps): update serde fork - correct alloc extern guard for wasm32v1-none + std feature unification 2026-04-23 03:30:11 +03:00
Kurdistan Tech Ministry 7cf3b01bcb fix(deps): update serde fork to fix E0152 duplicate alloc lang item in std test builds 2026-04-23 02:06:01 +03:00
Kurdistan Tech Ministry 861dfbe195 ci: retrigger clippy with warm cache after welati rebuild 2026-04-22 22:48:06 +03:00
Kurdistan Tech Ministry 47699b592b style(welati): rustfmt reorder cfg-gated imports 2026-04-22 20:25:10 +03:00
Kurdistan Tech Ministry c61bccc9ae fix(welati): cfg-gate Currency and SaturatedConversion imports to avoid unused-import in benchmarks
clippy runs with --all-features (includes runtime-benchmarks) so the
#[cfg(not(feature = "runtime-benchmarks"))] block is excluded and the
imports appeared unused. check-try-runtime runs without runtime-benchmarks
so the block is included and the imports are required.
2026-04-22 20:16:25 +03:00
Kurdistan Tech Ministry 606b7d3021 fix(ci): prefix unused alice_reward with _ in pez-rewards tests 2026-04-22 17:59:47 +03:00
Kurdistan Tech Ministry 19d869f588 fix(ci): ignore RUSTSEC-2026-0104 (webpki CRL parsing panic)
Transitive dep via kube/rustls. We do not parse CRLs in our P2P/RPC stack.
Added to both deny.toml and check-audit.py ignore lists.
2026-04-22 16:59:38 +03:00
Kurdistan Tech Ministry a36393b9f2 fix(ci): fix missing trailing newlines in validator-pool files (fmt)
bash command substitution strips trailing newlines; restored them.
2026-04-22 16:40:31 +03:00
Kurdistan Tech Ministry 84ea4f042a fix(ci): remove unused imports in welati pallet, add license headers to validator-pool
welati/src/lib.rs: Currency and SaturatedConversion were unused (clippy -D warnings).
pezkuwi/pezpallets/validator-pool/src/*.rs: 5 files missing Apache-2.0 SPDX headers.
2026-04-22 16:33:53 +03:00
Kurdistan Tech Ministry d98dfafc49 fix(runtime): fix CreatePresaleOrigin type mismatch in asset-hub runtime
EnsureRoot::Success = () but presale pallet requires Success = AccountId.
Switch to EnsureSigned<AccountId> so the transaction signer becomes
the presale owner — consistent with mock.rs and pallet semantics.
2026-04-22 07:52:07 +03:00
Kurdistan Tech Ministry 9d5b101fd7 fix(ci): fix check-zepter PATH and cargo-audit pipefail
check-zepter: CARGO_HOME=$CI_PROJECT_DIR/.cargo but export used $HOME/.cargo/bin;
switched to $CARGO_HOME/bin so installed zepter 1.82.1 takes precedence.

cargo-audit: set -o pipefail caused the pipe to fail with cargo-audit's exit
code (1 when vulns exist) even when python check passed; redirect to file first.
2026-04-22 06:39:22 +03:00
Kurdistan Tech Ministry 482cbbb1f6 fix(ci): fix taplo formatting and skip .cargo dir in workspace check
taplo.toml and deny.toml were using 2-space indent; taplo requires tabs.
check-workspace.py now skips .cargo the same way it skips target/ —
prevents 1000+ registry crates from being flagged as missing from workspace
when GitLab cache restores .cargo into the project directory.
2026-04-22 05:06:44 +03:00
Kurdistan Tech Ministry 99be20ba05 fix(ci): fix check-toml-format, check-licenses-headers, check-zepter
- taplo.toml: add .cargo/** to exclude list (prevents scanning cached registry files)
- deny.toml: reformat with taplo (tab indentation, proper spacing)
- pezpallets: add Apache-2.0 SPDX license header to 51 files missing headers
  (referral, trust, perwerde, pez-treasury, pez-rewards, welati, token-wrapper,
   messaging, staking-score, presale, identity-kyc)
- ci: check-zepter: prepend $HOME/.cargo/bin to PATH after cargo install
  so newly installed 1.82.1 takes precedence over system 1.78.2
- identity-kyc: fix clippy::needless_borrows_for_generic_args at lib.rs:326
2026-04-22 04:52:25 +03:00
Kurdistan Tech Ministry 857b63130d fix(ci): fix YAML syntax error — move audit python script to .gitlab/check-audit.py 2026-04-22 03:56:46 +03:00
Kurdistan Tech Ministry a2a37dca32 fix(ci): fix all cargo-deny and cargo-audit failures
- deny.toml: add all-features=true to [graph] — prevents krates 0.20+ panic
  on workspace crates that have std feature but don't enable it by default
- deny.toml: allow pezkuwichain/serde.git in [sources] (our wasm32v1-none fork)
- deny.toml: remove stale RUSTSEC ignores (2023-0071, 2024-0428, 2025-0055)
- deny.toml: add new wasmtime/rand/webpki advisories to ignore list
- ci: remove --exclude flag from cargo-deny jobs (flag removed in new versions)
- ci: rewrite cargo-audit to use JSON + python summary (prevents 4MB log overflow)
  and add all current advisories to ignore set with documented rationale
- ci: fix check-zepter to use --force (not --locked) so 1.82.1 actually installs
- Cargo.toml: add default=[std] to bizinikiwi-test-runtime-transaction-pool
  (std crate that was missing default feature, confusing krates graph builder)
2026-04-22 03:06:35 +03:00
Kurdistan Tech Ministry cfbde6de5a fix(ci): pass both --exclude paths to single flag (nargs=* overwrites on repeated use) 2026-04-22 01:29:52 +03:00
Kurdistan Tech Ministry 5b898402ad docs: fix all domain URLs — pezkuwichain.app → pezkuwichain.io, app link → app.pezkuwichain.io 2026-04-22 00:10:20 +03:00
Kurdistan Tech Ministry 1ca19e0956 ci: fix all failing jobs — upgrade cargo-deny/audit, fix CARGO_HOME, zepter version, mdbook image 2026-04-22 00:01:47 +03:00
pezkuwichain 0254a8ad3e ci: add Runtime Upgrade MR template 2026-04-21 20:28:22 +00:00
pezkuwichain ebecc350f9 ci: add Default MR template 2026-04-21 20:28:20 +00:00
pezkuwichain c0b0c371f5 ci: add Security issue template 2026-04-21 20:28:04 +00:00
pezkuwichain dc59853fe9 ci: add Feature Request issue template 2026-04-21 20:28:03 +00:00
pezkuwichain 04852535c6 ci: add Bug Report issue template 2026-04-21 20:28:02 +00:00
pezkuwichain 287fbfbcd2 docs: add DEVELOPMENT.md contributor setup guide 2026-04-21 20:27:35 +00:00