Skip to content

ci: prevent regressions in Rust sanitizing rules #3166

Open
2 of 3 issues completed
Open

Description

@mblua

Request

Add CI validation for the nine degradation symptoms documented in the shared sanitizing guidelines. The user authorized coordination and delivery on 2026-10-22; ac-architect-grinch-v5 supplied the task in 20261022-030254-room-18-ac-architect-grinch-v5-to-room-18-ac-tech-lead-v5-sanitizing-ci-gates.md.

Situation and verified evidence

Design reference: c22954821d1c8f54308de806ba6eeab534f2dbac, synchronized clean main in room 18.
Source specification: D:/0_repos/AgentsCommander_iac/.ac/project-shared/Guidelines/_sanitizing/README.md, metodo-de-estructura.md, and DegradationSymptoms/01..09 (each has a CI gate section).
Existing repository gates: scripts/check-module-cycles.mjs, scripts/check-module-arcs.mjs, and .github/workflows/pr-regression-gates.yml:82-87. scripts/gate-support.mjs exports a subprocess runner and self-test runner, not merge-base comparison. line-metrics.mjs exists in the shared guideline folder, outside the repository.
The source for symptom 03 also specifies internal-cycle arc growth and fixing improvements into the accepted baseline. The abbreviated handoff only says to reuse existing cycle/arc gates: architecture must reconcile this against the actual current coverage, without duplicating existing detectors.

Required outcome and scope

  • Validate changed Rust code against the PR merge-base; preserve existing debt and reject regressions, with the source-defined treatment of new files.
  • Cover long lines (>100 Unicode characters), file size (>1000 lines), module cycles/arcs, persisted-container ownership, canonical Rust file layout, Tauri boundary usage, dispersed disk access, mutable globals, and process/environment ownership.
  • Register persisted containers and owners as required for container/disk checks; define exact existing owner allowances from evidence.
  • Resolve production/test counting, measure granularity, source ambiguities and the above cycle-coverage discrepancy explicitly in the plan.
  • Use scripts/sanitizing_*.mjs and npm run sanitizing:* entry points, including an aggregate command with a summary. Integrate into existing pr-regression-gates.yml; no additional workflow.
  • Reuse compatible existing capabilities. Do not rely on files outside the checkout at CI runtime. No stored debt baseline for the new ratchet measurements; measure the PR base each run.

Acceptance

  1. Unchanged debt and improvements pass; worsening and prohibited new-file cases fail with actionable path and base-to-PR diagnostics.
  2. Each detector has focused positive/negative evidence that it actually detects its specified violation; cover relevant test exclusions and Git/base failure behavior.
  3. Existing cycle/arc gates remain effective without duplicate detection.
  4. CI runs the new validation on the relevant PR changes, with a usable merge-base and failure propagation.
  5. A versioned immutable plan, exact-version four-party consensus (architect, owning dev, Rust Grinch, architecture Grinch), implementation review and required CI precede PR landing.

Exclusions

No cleanup/refactor of existing Rust debt, app behavior changes, GUI/manual testing, version bump, application build or release. Supporting gate tests are in scope; optional extra architecture infrastructure is not an acceptance requirement.

Technical sizing and workflow

Full: architecture decisions and several distinct static checks with nontrivial false-positive/false-negative risk. Scores (1-20): footprint 10 (coherent scripts/CI surface); diagnosis 5 (explicit rules, current coverage inspection); domain 11 (Rust syntax and owner boundaries); ambiguity 11 (multiple viable scanning/comparison strategies); blast radius 8 (shared PR admission, reversible); integration 3 (Node/Git plus existing workflow); verification 14 (positive controls needed for detectors); state/compatibility 1 (inapplicable: no app persistence migration); concurrency 1 (inapplicable: sequential checks); environment/tooling 10 (merge-base and CI execution).
Raw 74; final round((74-10)/190*99)+1 = 34/100. Verification difficulty requires proof review; tooling requires the owning dev's written environment risk before code. Full overrides the score band. Partition is decided by the architect against the actual file inventory.
Excluded from score: issue/branch/PR creation, delegation, review rounds, CI waiting, merge, cleanup, changelog/version ceremony.

Approved implementation phases

Exact-version four-party consensus completed for plan-v6. Current source/measurement reference: 72aa89f after PR #3165. Full 332-entry inventory is required.

Phase Child Depends on Branch (created only at phase start)
P01 #3167 None ci/3167-sanitizing-baseline-text
P02 #3168 P01 ci/3168-sanitizing-layout-edge
P03 #3169 P02 ci/3169-sanitizing-ownership-summary

Canonical plan: D:/0_repos/AgentsCommander_iac/.ac/plans/3166-sanitizing-ci-gates/plan-v6-sanitizing-ci-gates.md
Plan-SHA256: 436C4A0F9006F76E1B1E22896B0D3868A889243E42D7E66F4579E212458B79F6
Mapping and standing-authorization receipt are stored separately from immutable plan bytes. Each child has its own PR; only the final verified delivery closes this epic.

Plan v6 exact-version consensus is complete. The self-runner contract is corrected in all affected phase documents; native self failures block CI and are distinct from debt-gate results. P01 resumes its authenticated eight-file checkpoint on branch3167 with PHASE_BASE72aa preserved; no new phase branch or duplicate child. Current immutable identity mapping: D:/0_repos/AgentsCommander_iac/.ac/plans/3166-sanitizing-ci-gates/phase-issues-v6.json. Standing-authorization approval: D:/0_repos/AgentsCommander_iac/.ac/plans/3166-sanitizing-ci-gates/approval-v6-identity-receipt.json. Earlier mapping/approval remain historical and unchanged.

Activity

  1. mblua commented on Oct 22, 2026

    @mblua
    OwnerAuthor

    Scope clarification from the user (2026-10-22): inventory all existing persisted containers, including dynamically generated names, families, temporary/rotated artifacts and identical basenames under distinct logical roots. The exact instruction was: "ok, que se inventarie todo".

    The registry must cover existing families with verified owners/classifications for gates 04/07. A seed registry plus detection of newly introduced names is insufficient: an existing unregistered family could gain external mentions without changing the global disk/writer counters or introducing a new name. The architect confirmed last-prompts.retained.json as one concrete example.

    Complete means a finite source inventory over the relevant repository code, with no unresolved persistence candidates; it does not mean enumerating every physical runtime file or UUID. Existing Rust debt remains untouched. No application build/release or GUI testing is added.

    The immutable plan and exact-version four-party consensus remain required before implementation. No implementation has started.

  2. mblua commented on Oct 22, 2026

    @mblua
    OwnerAuthor

    User execution constraint (2026-10-22): wait before triggering this task's CI, because another CI/change is expected shortly. This also holds publishing actions that would trigger CI; do not dispatch diagnostic CI around the hold.

    After that work, take all nine sanitizing measurements as the starting point on one explicitly recorded reference commit. Record commands/scope/results/limitations. Current design evidence at c22954821d1c8f54308de806ba6eeab534f2dbac remains useful, but is provisional relative to that later starting point; refresh affected evidence after the incoming change.

    Inventory research and plan preparation may continue. The complete container inventory remains required. This does not waive plan consensus or authorize implementation prematurely. The measurement receipt must not silently rewrite accepted cycle baselines or replace the merge-base comparison contract with stored debt thresholds.

  3. mblua commented on Oct 22, 2026

    @mblua
    OwnerAuthor

    The requested starting measurements are now recorded on 72aa89f, after PR #3165 merged. These are source measurements with documented scope and limitations, not verdicts from the future sanitizing gates.

    Signal Starting result
    01: line length 2,852 lines over 100 Unicode characters across 163 of 266 tracked Rust files
    02: file size 560,328 total lines; 108 files over 1,000 lines
    03: cycles One SCC with 89 members, 1,211 unique module arcs overall and 493 internal arcs; generated record identical to the committed record
    04: containers 332 families individually measured/listed; 289 owned; 60 production files with direct writes
    05: layout Vector: 21 mod.rs, 191 files with tests outside the designated location, 302 inline modules, 0 path attributes, 262 globs, 177 public modules outside lib.rs, 0 pub(super) modules, 0 pub(in) modules
    06: Tauri boundary Outside the boundary: Tauri/AppHandle 40 files, emit 20, state 17, command attribute 1; 183 production commands, 10 with disk access
    07: disk access 107 production files with disk access, 53 outside the allowances
    08: globals 71 production candidates, one demonstrated readonly Regex exception, 70 counted declarations
    09: processes/environment Outside the allowances: launches 9 files, environment reads 16, environment writes 0

    The inventory refresh reused 217 identical source blobs and updated only the four changed files. The registry retains 332 IDs and the same kinds, owners and selectors; source references and evidence now identify the measured commit. Coordinator checks verified all 55 receipt artifacts plus the receipt itself, all 221 source blobs, 1,325 sites and 1,228 references. Text measurements were independently recalculated from all 266 tracked Rust blobs.

    Canonical report: D:/0_repos/AgentsCommander_iac/.ac/plans/3166-sanitizing-ci-gates/round4-starting-measures-72aa89f2.md, SHA256 FB457E1BB0E4476B7D896BD19289F3A8B3C0F13B3897555A2F01A7513D6A5CF5. Evidence receipt: round4-evidence-receipt-72aa89f2.json, SHA256 5C4C3CECE55F6F584C0562899550A7D5208097986B5A16311C13368697785074.

    Container mention searches can overcount textual fragments. The 29 families without a finite literal retain runtime sites/reference lists and explicit non-applicable text searches instead of invented zeros. Production/test separation, aliases and readonly exceptions are documented in the matrices. Local Node 26 results do not prove Node 22 CI compatibility.

    No accepted cycle baseline was reset. No product implementation, build, app tests, push, PR or CI was launched. The architect is integrating the refreshed data, measurements and the bounded runtime contract correction into the next immutable candidate; exact-version consensus is still required.

  4. added
    EpicLarge cross-cutting work item
    on Oct 22, 2026
  5. mblua commented on Oct 22, 2026

    @mblua
    OwnerAuthor

    I3167 / E3166 — Frozen-plan contradiction; implementation checkpoint

    2026-10-22 UTC, coordinator ac-tech-lead-v5. This receipt supersedes the active execution authority of plan-v4/P01-v2 pending recertification. It does not change any frozen bytes or erase historical approvals. Current scope remains nine CI ratchets and the complete inventory, without Rust/runtime/dependency/lock/version/GUI/local-app-build/release changes.

    Architect report: p01-self-exit-architect-verdict-20261022.md, SHA256 CD2BC9233F189496FFDC47271A6EF59B0B227558DD698508CE3A8EF1CD3A5BC4; independent evidence p01-self-exit-probe-20261022.json, SHA256 E81E47FF897BD3633034A2FF0B9584A111B632FEF8D35B650B74C3A57C74891D. Both read by coordinator, hashes checked. Verdict PLAN_CONTRADICTION: P01:30 promises self failure4, whereas P01:49 prescribes node --test, whose local failed assertion exits1. P03 repeats the table. The native self result is not a debt-gate violation. A passing suite cannot establish the failure contract.

    Architect's minimum proposal is NOT APPROVED: keep the mandated entrypoint, explicitly separate native self-test statuses from typed gate results; update affected P01/P03 versions and epic references, then obtain new exact four-party consensus. Choosing a translation instead would also require an explicit reviewed design. No coordinator solution or implicit waiver. P02 needs no technical change for this finding.

    Implementation dispatch was valid against exact consensus at that time; the newly demonstrated contradiction invalidates continuing under that contract. Developer has been instructed to stop new product mutations, finish any active command safely, preserve existing outputs, and deliver a concrete shared checkpoint before any room purge. Message 20261022-053700-...-p01-contract-checkpoint.md Queued/Delivered b73314e5-21dc-494b-b964-abce0b8652fa exit0. No push/PR/CI; no implementation round purge with work in flight.

    Technical re-score of the newly required correction delta

    Original task score 34/100, raw74, remains the score for the full nine-rule task. The following 12/100, raw31, scores only the newly required self-exit contract correction proposed by the architect, not the remaining full implementation. No downgrade of the original architecture/Verification14/Environment10 requirements is implied.

    Category Score Matched anchor and reason
    Scope footprint 1 Near one-file/few-line anchor: minimum proposal adds no product edit, only clarifies the existing command contract; plan bookkeeping excluded
    Diagnosis 2 Near stated-cause anchor: exact conflicting lines and failed-run evidence already identify cause
    Domain 4 Below subsystem-specific10: Node test-runner exits and typed gate statuses
    Solution ambiguity 6 Between obvious1 and alternatives10: native statuses or explicit translation are viable; architect supplied one minimal proposal
    Blast radius 4 Near reversible/local1: failure classification is visible and reversible, but affects CI admission semantics
    Integration 2 Near self-contained1: existing npm/Node entrypoint, no new dependency or service
    Verification 5 Between existing-test1 and new-test10: failed/green self evidence exists; final contract and workflow propagation still require verification
    State/compatibility 1 Inapplicable: no persisted app state or migration
    Concurrency/timing 1 Inapplicable: sequential command execution, no new shared state
    Environment/tooling 5 Below platform/toolchain10: local Node26 evidence exists; CI Node22 remains separately verified at authorized delivery

    Raw=31. Final=round((31-10)/190*99)+1=12. Excluded: issue/branch/PR creation, pushing, CI waiting, review rounds, delegation/messaging, version/changelog ceremony, merge/cleanup and plan/identity bookkeeping.

    Workflow remains Full v5: this correction occurs inside an architect-authored multi-gate design with most implementation not yet accepted, and changes its failure contract. Same initial participants must vote on the new exact set; original proof review requirement is retained. Reuse all unaffected hashes, measurements, tests and implementation evidence. Do not broaden files, add a wrapper, reset baselines or restart inventories merely to resolve this discrepancy.

    Next safe boundary: receive developer checkpoint and all command completions; verify expected room peers idle; publish failed-contract/progress evidence; mandatory planning-round dry-run/real purge; assign architect a minimal new candidate including executable continuation from the recorded existing branch/output state. Subsequent exact consensus, mapping reconciliation and renewed applicable Step7.5 are required before resuming affected implementation. The standing authorization applies only after those gates and within unchanged user scope.

  6. mblua commented on Oct 22, 2026

    @mblua
    OwnerAuthor

    Round5 did not reach exact consensus: the developer and Architecture Grinch approved, while Rust Grinch requested one necessary clarification in P02:25, which still calls exit4 a self-test result. P01/P03 now distinguish native test-runner status from typed gate results; their corrected contract and authenticated continuation were accepted by all reviewers. The remaining clause must be made explicit in the phase document before cold implementation can continue. Majority approval does not replace the missing verdict.

    Original task score:34/100. Previous self/continuation correction delta:12/100. Remaining P02 clarification delta:5/100 (raw18; round((18-10)/190*99)+1), with category scores footprint1, diagnosis1, domain3, ambiguity1, blast radius3, integration1, verification3, state1 inapplicable, concurrency1 inapplicable, tooling3. The location and correction are known, no new product mechanism is proposed, and existing runner evidence is reused. Issue/branch/PR handling, CI waiting, review/delegation, versioning, merge and cleanup are excluded from technical cost. Full workflow and original implementation proof/environment gates remain mandatory.

    The next minimal candidate will revise the affected phase and epic references, preserve valid evidence and the eight-file checkpoint, then obtain exact-version votes. Scope remains all nine gates and the complete332-entry inventory. No product mutation, implementation commits, push, PR or CI occurred during this plan correction. The latest26-test suite,266-file corpus and remaining P01 verification are still pending, not claimed green.

    Canonical evidence: D:/0_repos/AgentsCommander_iac/.ac/plans/3166-sanitizing-ci-gates/round5-consolidated-result.md, including all verdict hashes and the full scoring rationale. Progress since the invalidated prior candidate: the self contract and continuation are resolved; the recurring ambiguity is narrowed to one P02 clause. No new functional scope or starting-measurement rerun is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EpicLarge cross-cutting work itemenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions