Repository navigation
1.9 Q0: size gate — inventory, schema, measurer, comparator (RFC-0038a) - #45
Open
cunninghamcard-bit wants to merge 3 commits into
Open
cunninghamcard-bit wants to merge 3 commits into
cunninghamcard-bit wants to merge 3 commits into
Conversation
…comparator (RFC-0038a) H = min(C, ceil(B*1.10)) computed in integers; CI passes iff actual <= H. Inventory maps RFC-0038a §4 artifacts to release.yml jobs; artifacts with no workflow path are marked 'unregistered' and listed, not failed (1.9b).
…udget on unregistered; report-only still fails BUDGET_UNREGISTERED RFC-0038a §1 :17, §9.4 :377, §12 :428 (upstream arcships#208 @ 11511b3).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unit 1.9 (PHASES, Q0 per RFC-0038a §12 :419). Base
exp/restart@ 8455db9. Head b3c1961 (f3f80c1 + must-fix: unregistered bypass closed).What
scripts/quality/budget_lib.py— strict schema (rejects unknown keys, duplicate keys/IDs, floats, negatives/bools, unconstrained*), measurer (raw/packed/unpacked; rejects path traversal, duplicate members, symlinks), comparator.hard_cap:45 —H = min(C, ceil(B*1.10)), done in integers as(B*11+9)//10. No floats.passes:52 —actual <= H.compare:342 uses the stored H. A stored H that differs from the formula, or B > C, is rejected when the file is loaded (RFC-0038a §3.2 :75).BUDGET_EXCEEDED,BUDGET_UNREGISTERED,ARTIFACT_MISSING,BUDGET_INVALID.measure-artifacts.py,check-budgets.py(with--report-onlyfor the Q0 transitional mode, §12 :428), andcheck-inventory.py.quality/artifacts.jsonhas 61 artifact IDs with the §4 product caps C.quality/size-budgets.jsonis empty: nothing has been measured yet, and B/H registration belongs to S2.contract-testsgets a step (ci.yml:407) that runscheck-inventory.pyand the unit tests.Negative tests (scripts/quality/tests/test_q0.py)
test_actual_equal_H_passes: B=1000, C=1e9, H=1100, actual=1100 passestest_actual_H_plus_one_blocked: actual=1101 gives BUDGET_EXCEEDED, delta=1test_rounded_ceiling_boundary: B=1001 gives H=1102; 1102 passes and 1103 is blockedtest_C_below_ceil_B_times_1_10_blocks: B=1000, C=1050 < 1100, so H=1050; 1050 passes, and 1051 and 1100 are blockedunregisteredentry never failsUnregisteredBypass): :154 the allowlist is exactly the 3; :161 the repo's unregistered set equals the allowlist; :166 a non-allowlisted unregistered entry is rejected; :170 every mapped repo artifact, if flipped to unregistered, is rejected; :183 an allowlisted entry that has a budget is rejected (by the loader and by compare); :194 the exact mutation: a mapped artifact flipped to unregistered, budget kept, actual 10^12 bytes, fails in the loader, in compare, and in the CLI with and without--report-only; :217--report-onlyexits 1 on BUDGET_UNREGISTERED; :227--report-onlylets an over-budget artifact through, while normal mode exits 1Artifact → workflow mapping (release.yml)
58 mapped, 3 unregistered.
.node×6napi prepublish) and the main@arcships/aimuxtgzUnregistered (listed here, not failed; completing them is 1.9b)
budget_lib.UNREGISTERED_ALLOWLIST(:37) is a fixed list in code with exactly these 3 IDs, so a config-only PR can't useunregisteredto skip the gate (RFC-0038a arcships#208 @ 11511b3: §1 :17, §12 :428):unregisteredis a load error (:157)comparealso reports it as BUDGET_INVALID even if validation was skipped (:388-389)--report-onlystill exits 1 on BUDGET_UNREGISTERED and BUDGET_INVALID (exit_code:417,NEVER_REPORT_ONLY:30; §9.4 :377). Only BUDGET_EXCEEDED and ARTIFACT_MISSING get through in report-only mode.aimux-java/checksum/jvm/default/release: Gradle maven-publish makes the md5/sha1 files implicitly during upload. No workflow step produces a file that can be staged and measured.aimux-kotlin/checksum/jvm/default/release: same reason.aimux-ffi/c-header/any/default/release:aimux-ffi/aimux-ffi.his only uploaded by ci.yml ffi-build as a CI artifact. No release.yml job publishes it.Checks (/workspace/fullcheck.sh at b3c1961)
decision › missing or null usage counts…). The same test also fails on exp/restart and in every earlier run log; this PR doesn't touch it.python3 -m unittest discover -s scripts/quality/tests: 29 tests OK. All 8 new tests fail against f3f80c1.check-inventory.pyexits 0.