feat(repo): pin rat-stack and measure the static scorecard rows - #46
Open
systemfsoftware-maker wants to merge 5 commits into
Open
systemfsoftware-maker wants to merge 5 commits into
systemfsoftware-maker wants to merge 5 commits into
Conversation
systemfsoftware-maker
added this pull request to stack #47
October 5, 2026 22:40
systemfsoftware-maker
force-pushed
the
verify/scorecard-static
branch
from
October 6, 2026 01:35
395bab5 to
0308278
Compare
The instrument gets its own flake: nixpkgs and the pnpm-release-management sandbox launcher pinned by rev, rat-stack fetched at ratstack.pin.json, and an offline pnpm store for the instrument's npm tools built by the launcher's fixed-output fetcher. The scorecard package runs the Deno orchestrator with those paths baked in. The static family measures M23 (suppression directives in tracked source, counted by parsing comments with oxc-parser) and M28 (distinct name@version in the lockfile, read with the yaml parser across both lockfile documents) for both sides, three runs each. Every tool runs in the launcher; the orchestrator only classifies the comments and package keys the tools return. verifyCitation re-checks the cited rat-stack text that M12 relies on
The fixed-output pnpm deps hash changed under pnpm 12.9.0; the local build reused the old output path because its hash was still set, and CI's clean store refused it (got sha256-1sxiCRZ...)
…dency driver Review fixes #1/#3 and #11 under Kiro's ruling: the launcher cannot nest (bwrap: setting up uid map: Operation not permitted), so scorecard journeys produces each manifest journey on the host (measureStatic end to end over two fixture git repos, and once with a tool that exits 3) and records it, then runs the one vitest project in the launcher. launcherRun(id) decodes the record with Effect Schema and fails red when it is missing or stale. scorecard check adds the import-graph rules and runs in check:ci
systemfsoftware-maker
force-pushed
the
verify/scorecard-static
branch
from
October 6, 2026 05:49
722c5ad to
849d77b
Compare
…tore The macOS leg failed with a hash mismatch on the tools store: pnpm fetches only the current platform's optional packages, and on Linux it also skips musl-only bindings. supportedArchitectures lists linux and darwin, x64 and arm64, glibc and musl, so the fetched set and its fixed-output hash are the same on every system
pnpm fetches a different file set on darwin than on linux even with supportedArchitectures listing both, so one fixed-output hash cannot hold for every system. The darwin value is the one the macOS CI leg computed for this lockfile
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.
Layer 2 of the rat-stack scorecard stack (plan:
docs/plans/2026-10-05-2151-feat-ratstack-scorecard-plan.md, unit U2). It sits on #44. It stays inert until U3 adds the workflow.What lands
evals/ratstack-scorecard/flake.nixhas its own lock. It pins nixpkgs to4975466(the root's rev) and the launcher topnpm-release-management/1801228(PR ci(release): keep the release pipeline off the template placeholder #5).ratstack-srcfetches rat-stack atratstack.pin.json(54d3560, rat-stackmainHEAD) as a fixed-output fetch.tools-storeis the offline pnpm store for the instrument's npm tools. It is built by the launcher repo'smkPnpmWorkspacePackages(nixpkgsfetchPnpmDeps, fetcher v4).scorecardruns the Deno orchestrator with those paths baked in. Its--allow-runis limited togitand the pinned launcher.src/families/static.ts) measures two rows on both sides, three runs each:src/tools/extract-comments.mjsrunsoxc-parserinside the launcher and returns comment text. The orchestrator classifies that text withsrc/model/directives.ts, using rat-stack's three ledger families plus Stryker, ESLint, Biome, dprint,deno-lint-ignoreand coverage ignores.name@versionpackages.src/tools/parse-lockfile.mjsrunsyamlinside the launcher and reads both YAML documents of a pnpm 11/12 lockfile.src/model/lockfile.tsdeduplicates the keys.src/sides/{ratstack,starter}.ts:tools/oxlint/anti-slop/andvendor/, the same trees its own ledger excludes.repos/(subtrees) andevals/(the instrument itself).verifyCitation(src/model/verify-citation.workflow.ts) re-checks a cited rat-stack line range at the pin. M12 uses it in U7.Deviations from the plan, declared (CONST-W3)
minimumReleaseAge(1 day) refused it insidefetchPnpmDeps(exact error in the session:@oxc-parser/binding-*@0.153.0 was published at 2026-10-05T10:2x, within the minimumReleaseAge cutoff). I kept the policy and used the newest version older than a day.ratstack-toolchainlockfile-hash derivation. Here the toolnode_modulesare installed inside the sandbox fromtools-store.ratstack-toolchain(Node 24.20.0 plus the pnpm 11.3.0 tarball) lands with U4, which is the first unit that runs rat-stack's own install.directives.ts. Citation checking is a decision (Verified | Contradicted), so it is a workflow.Verification (run in this session)
M23 compared with rat-stack's own published total.
https://ratstack.sh/debt.mdtoday shows 217: effect-diagnostics 75, oxlint 138, typescript 4. The neutral counter gets 219 at the pin. The two extra directives are one@ts-*and oneeslint-disable. Both sit outside rat-stack's ledger roots (it counts onlyapps|packages|scripts|tools/and root*.config.ts). KTD8 counts every tracked source file except declared vendored trees. The site also servesed63ba3, while the pin is54d3560.Sabotage
isSourceFilealso accept.mdturns J2 red (only the directive in a comment counts …:filesgainedREADME.md). Reverted, and J2 is green.slice(lines[0] - 1, lines[1] + 1)) turns the citation law red. The previous version of the law checked only the line after, missed this sabotage, and was strengthened to check both neighbours. Reverted, and the suite is green (30 passed).SCORECARD_SANDBOX=/nonexistent/sandbox) is refused by Deno itself:NotCapable: Requires run access to "/nonexistent/sandbox". The orchestrator can spawn onlygitand the pinned launcher, so no tool has an unsandboxed path.Review fixes (Kiro rulings, 2026-10-06)
Commits on this stack, per ruling. Local gate at
bd50211:pnpm format:checkok,gate:tasksandgate:distgreen,pnpm scorecard:check40/40 (import rules, then journeys),tsc -p evals/ratstack-scorecardclean,deno check src/clean, actionlint clean. Mutation runs in CI only.b937803(#44),849d77b(#46)static-family.test.tstomeasure.test.tsstill runs it from its record; asrc/model/misplaced.test.tsimporting the fixture failsscorecard check(exit 1)9bfdcfd(#44)meetsBar => true: 2 tests red; reverted green9bfdcfd,bd50211aggregateon families with a second ratstack M23 cell:DuplicateCell {"id":"M23","side":"ratstack"}, exit 1849d77b(#46)MissingLauncherRecord, red; edited fixture repo without re-producing:StaleLauncherRecord, red; failing tool givesInstrumentErrorwithexited 3bd50211cache-checkon a poisoned entry:CacheUnusable … M23, M28, exit 1; clean entry exit 0; save is gated on the same checkbd50211pin checklive:PinMoved 54d3560 -> 65e9465;GitRefSchemarequires 40 hex; push uses--force-with-lease=<branch>:<tip>and refuses a tip by another authorbd50211git config --get credential.helperstores the literal${GH_TOKEN};git credential fillyields the secret from env onlybd50211GithubApiErrornaming the request, exit 1 (no silent baseline); 15 s timeout, 3 transient retriesac93e77,bd50211src/harness/sandbox.tsleaves M23/M28 hashes unchanged; editingsrc/families/static.tsmoves both; grading jobs check outbase.sha;instrument previewjob iscontinue-on-error849d77b,bd50211import 'effect'tosrc/families/static.tsfails the import check (exit 1); driver flake has no--allow-net