Repository navigation
fix(ci-health): B-ALLOWLIST is additive, with an Idris2 proof (stopgap for the standards move) - #1198
Conversation
…replaces it remediate.sh B-ALLOWLIST PUT the curated set as the whole allow-list and forced github_owned_allowed and verified_allowed on. A repository's own patterns were dropped, so its workflows using them would be refused at startup, and a deliberate verified_allowed=false became true; the read-back still printed "exact set verified". This is the stopgap chosen for the standards repository's move, which the sweep runs estate-wide once its token works. It now reads the current setting first (and writes nothing if it cannot), writes current UNION required with both flags as read, skips the write when nothing is missing, and checks the read-back against that union. test/ci-health-test.sh runs remediate.sh and detect.sh over a four-row corpus (empty, extras, partial, covered) through a stateful mock gh: no pattern dropped, every required pattern present, flags kept, a second run writes nothing, detect.sh stops firing. Negative controls: main's script fails the covered row; forcing verified_allowed on fails extras. The suite was run by no workflow; test/ci_health_allowlist_corpus_test.exs puts it in the ExUnit lane. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw
An engineering property of one script, so Idris2 under PROOF-POLICY §1, in the shape of ActionsLockClosure: keepsCurrent (monotone), coversRequired, onlyAdds, flagsKept, noWriteWhenCovered, converges and idempotent, proved for patterns with decidable equality, plus the four corpus rows as equations. test/ci-health-test.sh binds each row's `-- corpus:` line and equation to the fixtures; a drifted equation fails it, and idris2 rejects a wrong count. Ledger rows allowlist-remediation (idris2, proven) and allowlist-remediation-corpus (exunit, tested-only); the rendered table and the four quoted censuses move to 35 proven of 57; 13 tested-only. keepsCurrent is the premise of mathesis THY-1 (Monotone.reach-mono); it is not a Mathesis bridge record, whose endpoints are theory provers only. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw
The rollout record states the stopgap's actual contract (current UNION required, trust flags as read) and the owner ruling that WF028 gets no separate model: its call extraction moves onto the parsed workflow model of #971. DEBT-REGISTER CI-9 records the defect found and fixed. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
SonarCloud shell:S7688 on the seven new tests in remediate.sh and ci-health-test.sh (both bash, as #997 did for the Logtalk guard). Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw
|
Rust License & Ban Check is red on
No fix PR exists yet, and both changes are outside this PR's scope, so I haven't added them here. Generated by Claude Code |
Owner ruling 2026-11-17: the sweep's 401 is resolved by #1197 (GitHub App installation tokens replace HYPATIA_DISPATCH_PAT), not by rotating the PAT. The owed-actions table and the update triggers now say so. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw
…3) (#1201) ## What - **RUSTSEC-2026-0544 (vulnerability).** `libz-sys` 1.1.31 → **1.1.33**, via `cargo update -p libz-sys`, which locks one package. zlib 1.3.1.2–1.3.2 overflow the heap in `gz_vacate()`. The workspace reaches it through `git2` → `libgit2-sys`. - **RUSTSEC-2026-0543 (unmaintained).** **`chrono` → `jiff`** in all four crates (`cli`, `data`, `adapters`, `integration`). The owner ruled on 2026-11-17 to migrate rather than ignore the advisory. | chrono | jiff | |---|---| | `DateTime<Utc>` | `Timestamp` | | `Utc::now()` | `Timestamp::now()` | | `.to_rfc3339()` | `.to_string()` | | `.timestamp()` | `.as_second()` | | `Duration::days(n)` | `SignedDuration::from_hours(24 * n)` | | `DateTime::from_timestamp(s, 0)` | `Timestamp::from_second(s)` | | `DateTime::<Utc>::from(SystemTime)` | `Timestamp::try_from(...).ok()` | | `.format(...)` | `.strftime(...)` | `Timestamp - Timestamp` is a calendar `Span` in jiff, so the two `duration()` helpers and the parallelism assertion now use `duration_since`, which returns a `SignedDuration`. - **New `adapters/tests/timestamp_wire_tests.rs`.** It pins the shapes the forge adapters deserialise: - `Z`, `+00:00`, milliseconds, microseconds and a non-UTC offset all parse to the same instant; - a naive time is refused, as chrono refused it; - RFC 3339 round-trips; - the epoch conversion `radicle.rs` uses gives the same result. - **Docs.** The dependency table in `docs/api/rust-api.adoc` and the code samples in `docs/integration/github-registry.adoc` now name jiff. ## Why `cargo-deny` started failing on `main` and on every PR as soon as these advisories were published (e.g. #1198's *Rust License & Ban Check*). chrono has no safe upgrade. ## Evidence - **`cargo-deny` 0.21.0, with the repo's `deny.toml`** (the same config CI uses): - on `main`: `advisories FAILED`, with `error[unmaintained]` RUSTSEC-2026-0543 and `error[vulnerability]` RUSTSEC-2026-0544; - on this branch: **`advisories ok, bans ok, licenses ok, sources ok`**. - **`ci.yml`'s commands, all `--locked`, all pass:** `cargo check --workspace --all-targets`, `cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace --all-targets` (every suite ok, including the 4 new wire tests) and `cargo test --workspace --doc`. - **The epoch value in the test is checked independently:** `date -u -d 1794935190` gives `2026-11-17T17:06:30Z`. - **No user-visible format change.** No `Timestamp` is printed with `Display`; I checked every field of type `Timestamp` and the only other use is a `sort_by_key`, where the ordering is the same. - **Serialised JSON still parses, but its fractional seconds may print differently.** chrono printed 0, 3, 6 or 9 digits after the decimal point; jiff prints only as many as needed. Both are valid RFC 3339. - **`chrono` is still listed in `Cargo.lock`,** but only as `serde_with`'s optional dependency, which isn't enabled (`testcontainers` takes `serde_with`'s default features). `cargo tree -i chrono --target all` prints nothing, and `cargo-deny` doesn't count it. - AsciiDoc: `rust-api.adoc` builds clean. `github-registry.adoc` has the same 2 warnings as on `main` (a section level at line 1288, and the optional `rouge` gem). ## Not done - No live forge API was called. The wire test covers the documented shapes. --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw)_ Co-authored-by: Claude <[email protected]>
|
|
Integration Tests on The failing test is Why it isn't this PR's:
What I did: re-ran the failed job once. Proposed hardening, for its own PR: measure the ratio in reductions or Generated by Claude Code |
## What `verification/PROOF-STATUS.adoc`, AllowlistRemediation row: `Receipt run: pending its first run on main` → the receipt from that run. ## Why #1198 merged with the receipt marked pending, because Verify Proofs had not yet run on `main`. That run is now done. ## Evidence - **Verify Proofs run [44154561700](https://github.com/hyperpolymath/hypatia/actions/runs/44154561700)** on `a5acb963` succeeded: - its `idris2 --check` job 134291680073 succeeded; - the job log shows `✓ AllowlistRemediation.idr`. - **Local checks on the edited file**, all passing: - `scripts/proof-ledger.sh render --check`: block is current; - `scripts/proof-ledger.sh check`: 57 rows valid; - `tests/proof-ledger-test.sh`: 53 passed, 0 failed; - `scripts/check-proof-status.sh`: 0 mismatches; - `asciidoctor --failure-level WARN`: clean. ## Not done Nothing. --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw)_ Co-authored-by: Claude <[email protected]>
… fits an exponent (#1205) ## What **1. `integration/src/ci_simulation/mod.rs`: one lifecycle instead of three copies** (2086 → about 1690 lines) - `MockGitHubActions`, `MockGitLabCI` and `MockCircleCI` each carried a ~260-line copy of the whole `SimulatedCI` lifecycle. - That lifecycle is now written once, as `impl<P: SimProvider> SimulatedCI for P`, over a shared `SimBuildStore`. - Each provider supplies only `kind()`, `store()` and `initial_jobs()`. - **Behaviour change (owner ruling: one strict core).** The copies had drifted. GitLab and CircleCI: - let a completed build be cancelled; - concluded `Success` even after a failed job; - ignored job `needs`; - reported `critical_findings = 0`. All three providers now follow the strict lifecycle GitHub already had. Each provider's job layout is unchanged. - **Also fixed (aa09a2e, found by CodeRabbit, the same line is on `main`).** A workflow job's `needs` held job ids (`"build"`), but `advance_build` checks them against job names (`"Build"`). So the default workflow's `Test` job never started. **2. `test/kyaml_complexity_test.exs`: the KYAML linear-time test** - **Before:** `t(20k)/t(5k) < 10` in an async module. On #1198 it measured 11.4 for the current, linear parser. - **Now:** a synchronous module fits the exponent `k` in `t ∝ n^k` by least squares over 2,500, 5,000, 10,000 and 20,000 entries. Each size takes the best of five runs, each in a fresh process. It asserts `k < 1.4`. - A fourth test checks the fit itself on exact power laws. - The old test is removed from `test/kyaml_test.exs`. ## Why - **Simulator:** SonarCloud failed its duplication gate on every PR that touched the three copies (20.4% on #1201), and the copies had already diverged into bugs. - **KYAML:** the two-point wall-clock ratio is noisy enough to fail on a loaded runner. ## Evidence **Simulator** - **ci.yml's Rust commands pass on the workspace:** - `cargo check --all-targets --locked`; - `cargo fmt --check`; - `cargo clippy --all-targets -D warnings`; - `cargo test --all-targets`: every test binary ok; - `cargo test --doc`. - **Four new tests run each lifecycle rule against all three providers.** As a negative control I appended them to `main`'s `mod.rs`. Three fail there for GitLab CI: - cancel returns `Ok(())`; - the conclusion is `Some(Success)`; - `critical_findings` is `0`. The job-layout test passes on both versions. - **`the_default_workflow_advances_to_completion_through_its_needs`** fails without aa09a2e. The jobs stop at `[("Build", Completed), ("Test", Queued)]`. - **SonarCloud:** quality gate passes, 0.0% duplication on new code. **KYAML exponent, five fits per shape, measured locally** | shape | current parser | pre-fix parser (6a3407a) | |---|---|---| | map | 1.00 to 1.15 | 1.74 to 1.88 | | seq | 0.99 to 1.16 | 1.87 to 2.02 | | flow | 0.98 to 1.04 | 1.56 to 1.69 | - **Under load:** with one CPU-bound process per scheduler, the current parser's map shape fits **0.98 and 1.01**. Those two fits completed; the run hit its 25-minute timeout before the others. - **Reductions were tried and rejected.** The pre-fix map shape fits 1.06 on reductions, because its quadratic copying ran in BIFs, so a reductions test would let that regression through. - **Elixir suite:** `mix test` gives 3709 tests, 0 failures, 3 skipped (246 excluded). It ran while another VM was saturating every scheduler. - `mix compile --warnings-as-errors` and `mix format --check-formatted` are clean. - The self-scan reports 0 findings on the changed files. ## Not done - **`governance / Validate Hypatia Baseline` fails, but this PR doesn't cause it.** It is red on `main` since #1204 (RE011). See the comment on this PR for the three ways to fix it. - The `generate_mock_results()` duplication in `cli/src/commands/search.rs`. It's mock search data, not the CI simulator, so I left it for its own change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw --------- Co-authored-by: Claude <[email protected]>



What
scripts/ci-health/remediate.shB-ALLOWLIST used to replace the allow-list. It now:selected-actionssetting first, and writes nothing if it can't;github_owned_allowedandverified_allowedback exactly as read;verification/proofs/idris2/AllowlistRemediation.idris a new Idris2 model of the remediation, in the shape ofActionsLockClosure. It proves:keepsCurrent: monotone, so nothing allowed before is lost;coversRequired: every required pattern is present;onlyAdds: nothing beyond the required set is added;flagsKept: neither trust flag changes;noWriteWhenCovered: a list that misses nothing is left alone;converges: after one rundetect.shstops firing;idempotent: a second run changes nothing;empty,extras,partial,covered), and the mockghis now stateful.test/ci-health-test.shruns the realremediate.shanddetect.shon each fixture and checks every property above. It also checks the model's-- corpus:line and the equation under it, so the model and the script can't drift apart.test/ci_health_allowlist_corpus_test.exsputs that shell suite into the ledger'sexunitlane.allowlist-remediation(idris2, proven) andallowlist-remediation-corpus(exunit, tested-only). The rendered table and the four quoted censuses now read35 proven of 57; … 13 tested-only. PROOF-STATUS gains an explanation section and a boundary-table row.Why
This is the stopgap the owner chose for
hyperpolymath/standards→metadatastician/standards. The CI-health sweep would run it across roughly 360 repos the momentHYPATIA_DISPATCH_PATworks. Before this change, any repo with a pattern of its own would have lost it, so the workflows using it would be refused at startup. A repo that had turned verified-creator actions off would have had them turned back on. In both cases the script would still have printedFIXED … exact set verified.The bug was reproduced against
main's script: a repo allowingsomeone/special-action@*came out of the PUT without it, and withverified_allowed: true.There was also a separate gap:
test/ci-health-test.shwas run by no workflow, so the CI-health tests were dark until this change.Evidence
idris2 --check AllowlistRemediation.idr: passes. Idris 2 0.7.0, built from source withscripts/dev/install-toolchain.sh --with-idris2, under%default total, with nobelieve_me,assert_totalorpostulate. A wrong count inrowExtras(131 instead of 130) is rejected (Mismatch between: S … and 0).bash test/ci-health-test.sh: PASS. Negative controls:main'sremediate.sh→FAIL [covered]: a current pattern was dropped;verified_allowedto true → fails theextrasrow;mix test(Elixir 1.19.4 / OTP 27): 3588 tests, 0 failures, 3 skipped (246 excluded).mix compile --warnings-as-errors: clean.scripts/proof-ledger.sh check(57 rows valid),claims(4 quotes agree), andrender --checkall pass.tests/proof-ledger-test.sh: 53/53.scripts/check-proof-status.sh: 0 mismatches.shellcheck0.9.0 is clean onremediate.sh,mock-ghandci-health-test.sh.asciidoctor --failure-level WARNis clean on all six.adocfiles.scripts/check-readme-claims.shpasses, andmix format --check-formattedpasses on the new test../hypatia scan .): 0 findings on the changed files. 17 findings elsewhere were not compared withmain.proven. Verify Proofs derives that from its ownidris2 --checkreceipt on this head, so the PR goes red if it doesn't hold. The PROOF-STATUS section says "receipt run: pending" until the run ID is recorded after merge.Not done
Monotone.reach-mono) is recorded in PROOF-STATUS instead.HYPATIA_DISPATCH_PATand adry_run: truesweep.action-superset.txthas two duplicate lines (SonarSource/sonarqube-scan-action,dawidd6/action-send-mail). They're left as they are; the new code deduplicates.Generated by Claude Code