fix(intake): untested invariant must subtract only classified Intake records - #92
Open
x-dc-coder wants to merge 1 commit into
Open
fix(intake): untested invariant must subtract only classified Intake records#92x-dc-coder wants to merge 1 commit into
x-dc-coder wants to merge 1 commit into
Conversation
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.
Problem
Since
928cb55(main HEAD), every[Submission]issue preflight fails atnpm run validate→check-public-site.mjs. The submission itself passes (prepare-issue-intakesucceeds and creates the pending-review record + typed Harness plan;intake:checkaccepts the queue), but the repo-wide inventory invariant then throws, soCommit the pending-review record/Open the review PRare skipped — the record can never reach main, so no maintainer can classify it. This is a pipeline self-block, not a submission-content problem.Tracked by #48 and #57; independently reproduced by the author of #89. Additional blocked data points: #86, #87, #90, and #91 (lab-monitor@2.0.0, 2026-08-28).
Root cause
check-public-site.mjsline 127 expects:but
build-verification-inventory.mjscan only classify a project when the Intake record maps to a Catalog project and is in one of the three classified states (current-baseline-passed/source-evidence-passed/blocked). A newly prepared pending-review record starts in stateuntestedand is not (yet) in the Catalog, so the expected formula counts one more subtracted record than the builder can observe. Any new submission makes the two sides differ by exactly 1, permanently.Measured on
928cb55with the #91 record replayed locally vianode scripts/prepare-issue-intake.mjs:Fix
Subtract only the classified records (the same three states the builder uses). Mathematically identical to the current expectation whenever every queue record is classified (today's main), so there is no behavior change for the current tree; it only stops the false failure when a pending-review record is in flight.
The gate remains strict: it still pins
untestedto an exact count derived from the authoritative Intake queue, and every other invariant in the block (empty Registry,transactional === 2, supplemental-only external evidence, full project coverage, capabilities present) is untouched.Evidence
928cb55(Node 22,npm ci --ignore-scripts):npm run validatefails exactly as CI does (verification inventory must cover every Catalog project…);npm run checkandnpm run validatefully green (100 tests: 99 pass, 1 skip;public site accepted: 680 catalog entries …) with the 12th pending-review record present in the queue.inventory.summary.verification.untestedfrom 669 to 670 makescheck-public-site.mjsfail (exit 1) again; restoring makes it pass. The gate still catches real desyncs.registry-v1.jsonper INTAKE.With this in place the
intakeworkflow can commit the pending-review record and open the review PR for #91 (and every other blocked submission), after which the normal human trust review and current-baseline verification proceed unchanged.