Skip to content

feat(rendered-views): keep the CDN pins and SRI hashes on a Dependabot-bumped manifest - #18281

Merged
kyle-sexton merged 10 commits into
mainfrom
feat/17783-cdn-pins-dependabot
Nov 24, 2026
Merged

kyle-sexton merged 10 commits into
mainfrom
feat/17783-cdn-pins-dependabot

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Closes #17783
Siblings: #18336

Summary

The rendered views' jsDelivr pins now come from a manifest Dependabot bumps, which delivers done-when items 1 to 4 of #17783. The pr-unblock route that syncs a Dependabot pull request (item 5) merged in #18336, and this pull request makes it live. It also closes the five gaps the review of #18336 found (hold comment), so the route goes live with both merge gates bound to its own commit.

Fix

  • lib/cdn-pins/package.json pins mermaid 12.3.0 and @tailwindcss/browser 4.3.5, the versions the deepening view loads. package-lock.json was written with npm install --package-lock-only --ignore-scripts, and nothing installs the directory.
  • .github/dependabot.yml gains an npm entry for /lib/cdn-pins, in the same per-directory shape as the other npm entries.
  • lib/cdn-pins/sync.mjs sync fetches each bumped file, refuses it unless it equals the file in the npm tarball the lockfile pins (gap 7), hashes its exact bytes with the algorithm pins.json records (sha256, as #17844 chose), and rewrites every target that pins.json lists. It rewrites each URL, SRI hash and CSP source as written, inside a regular-expression literal, and as the "<name> " prose form, then updates pins.json. Before it writes anything, it checks that every target carries the new pins.
  • lib/cdn-pins/sync.mjs check is offline. It fails while package.json and pins.json disagree, or while a target lacks its current URL or hash or names another version.
  • The CI check is lib/cdn-pins/sync.test.sh. It runs check on the repository's own tree, and its test-scope header makes the test-bash lane select it whenever the manifest, the record or a target changes.
  • Targets: deepening-report.mjs (the builder that emits the tags and the CSP), its test, html-report.md, and the two CSP eval samples. The issue named three of them. The builder and its test carry the same pins, so they are targets too. No other file loads from jsDelivr: the remaining cdn.jsdelivr.net hits are negative eval samples and an unrelated adapter doc.

The review gaps:

  1. Exact sync commit in both merge gates. cdnSyncRefusal (.github/scripts/pr-unblock/dependency-classify.mjs) and cdn_sync_refusal (babysit_dependabot.py) took any lanes App commit whose message contained [dependabot skip]. Both now call a message check (cdnSyncMessageRefusal / cdn_sync_message_refusal). It takes only the cdn-pins-sync row's message as apply-patch's commitMessage renders it for the apply-cdn-pins-sync job: the subject Sync the CDN pins to the bumped manifest on <head ref> [dependabot skip] on the pull request's own head ref, a blank line, then the one trailer Lane-Activity: pr-unblock/review-dependency (lane pr-unblock, patch-activity: review-dependency in pr-unblock.yml). Final newlines are ignored. Another row's subject or another branch is cdn-sync-message. A missing, different or extra trailer line is cdn-sync-trailer. Every earlier check stays: lanes App author, web-flow committer, valid signature, one parent, base-registry paths, in-place 100644 modification, and a refusal when the base registry is missing or unreadable. The head ref comes from pull.head.ref (apply-dependency-verdict.mjs) and pr.head.ref (_dependabot_content in babysit_merge_policy.py).
  2. Floor rows. lib/cdn-pins/pins.json and lib/cdn-pins/sync.mjs are enforcement rows in docs/conventions/pr-pipeline.yaml, next to cdn-paths.mjs. The generated copies were regenerated with scripts/sync-hold-floor.py. The pins were recounted from the merged yaml after the main merge, with digests recomputed: 168 to 170 classes, 68 to 70 enforcement, 136 to 138 config rows. The high (100) and author-review (24) sets did not change.
  3. Contract test of the real sync.mjs (lib/cdn-pins/sync.test.mjs). check(root) returns a list of strings: empty on a synced tree, non-empty on a stale one. node sync.mjs sync <root>, the argv the review-cdn-pins-sync container runs, rewrites every target, and it exits 1 with nothing written on a 404. Fetch is answered offline through a --import preload (lib/cdn-pins/fixtures/fake-fetch.mjs).
  4. End-to-end test (apply-patch.test.mjs): cdnRequest builds the request, the real sync.mjs runs in the container's shape into a result directory, and the cdn-pins-sync.mjs patch CLI builds the patch. Apply-patch then pushes it under the cdn-pins-sync row with the base registry, using the lane and activity read from the apply-cdn-pins-sync job. The pushed message passes cdnSyncMessageRefusal, and only the registry and the changed target are modified. .github/scripts/pr-unblock/cdn-pins-sync.test.mjs covers the CLI's outcomes: no result directory, or unchanged results, exit 1 with no patch file; changed results give a patch of those files alone; a non-regular result and a bad usage fail.
  5. Registry size: the real pins.json names the registry plus 5 targets, 6 paths. That is within the cdn-pins-sync row's max-files of 6 (lib/cdn-pins/sync.test.mjs).
  6. The floor rows no longer send every Dependabot CDN bump to a person. The lanes App's sync commit always modifies lib/cdn-pins/pins.json, so CI Status's require-checks step held each such bump with "A person merges it", which contradicts owner decision Q154 A. The step now has a Dependabot exit (pr-require-checks.yml, outside the generated hold-floor block). When the held set is exactly lib/cdn-pins/pins.json, listed once in the broker's file pages as modified with no previous name, the hold clears on the lanes App's newest review-dependency round marker for this head with verdict=merge. That is the same marker check the action-ref exception uses, now one merge_verdict function. Until then the step fails with #<n> by Dependabot changes only the CDN pins record on trust-gate paths. review-dependency.mjs GATE_HOLDS reads that as a verdict hold, so the round runs and the dispatcher re-runs CI Status after the verdict, where the old message would have been skipped as gate-hold. Any other held path, a rename, missing pages, an unreadable read, or a marker for another head, by another account or with another verdict keeps the hold. The diff_risk.py concern does not apply: score_unattended does not score a Dependabot pull request (babysit_merge.py:3691-3695, not-scored:dependabot), and enable-auto-merge.mjs arms only the lanes App's own pull requests.
  7. The CDN bytes are checked against npm before their hash is pinned (security review, lib/cdn-pins/sync.mjs:128). sync used to hash whatever jsDelivr served, so with the route merging unattended a jsDelivr serving tampered bytes at sync time would have had its hash pinned as trusted. Now, before writing any target, for each package whose version changes, verifiedFile requires the package-lock.json entry node_modules/<name> to lock the bumped version, to resolve to the canonical registry tarball https://registry.npmjs.org/<name>/-/<basename>-<version>.tgz (the same form dependency-classify.mjs requires), and to carry one sha512- integrity. It fetches that tarball, checks its sha512 against the lock, gunzips it with node:zlib, reads package/<file> with a small ustar parser (tarFile: header checksum, octal size, block padding, the prefix field and a pax path; any other entry type, a truncated entry or a second copy is refused), and requires jsDelivr's bytes to equal that entry byte for byte. Only then does it record the SRI hash from those bytes. A package whose version does not change is no longer fetched. Any failure exits 1 and writes nothing, as a jsDelivr 404 does. cdnRequest now reads lib/cdn-pins/package-lock.json from the pull request head and carries it as request.lock, and the review-cdn-pins-sync container writes it into the work tree beside the manifest. It is not in request.files, so the patch still changes only pins.json and targets. The request's sha256 check is unchanged.

Choices, each with its basis:

  • An offline check, so a jsDelivr outage cannot turn ci-status red. Basis: ci-status is the one required check (AGENTS.md "Pull request states"). The cost is that a hash someone edits by hand in pins.json and in every target together goes unnoticed until the next sync.
  • A selected test suite rather than a new hygiene-gate step. Basis: a gate step also needs the aggregator's CHECK_RESULTS and a scripts/check-affected-gates.txt row (pr-require-checks.yml, the check-skills aggregator); a suite needs neither.
  • The gates compare the head ref exactly, which is stricter than any ref-safe text. Basis: HEAD_REF is the pull request's head ref in pr mode (pr-run-activity-write.yml), and apply-patch fills {ref} with it verbatim (commitMessage in apply-patch.mjs).

Verification

  • Done-when 2: node lib/cdn-pins/sync.mjs sync on the committed head (live fetch) printed nothing to change, and git status --porcelain was empty after it. The skill text, the builder, its test and both eval samples are byte-identical.
  • package-lock.json resolves every package from registry.npmjs.org only. The root package.json declares no workspaces, so no root npm ci installs this directory.
  • Done-when 3, run live on this worktree and then reverted:
    • Setting mermaid to 12.2.0 made check fail with package.json pins mermaid 12.2.0 but the views carry 12.3.0.
    • sync then rewrote the URL, hash and CSP source in the builder, the plain and regex forms in its test, the prose version, CSP and hash in html-report.md, and the mermaid eval sample. After that check passed, and deepening-report.test.mjs passed (31 pass).
    • The 23-candidate fixture page built from the bumped builder rendered in headless Chromium: window.mermaid loaded, 2 Mermaid SVGs drew, Tailwind injected its styles, and there were no console errors.
    • Setting 12.3.0 back and running sync returned every view to its committed bytes.
  • The repository's own plugins/architecture/scripts/deepening-report-browser.test.sh (headless Chromium against the pinned CDN files) passed 21 of 21 on this head.
  • After the main merge, on the review fixes:
    • lib/cdn-pins/sync.test.mjs: 11 pass (the contract, CLI and max-files tests among them).
    • .github/scripts/pr-unblock/cdn-pins-sync.test.mjs: 3 pass.
    • .github/scripts/pr-unblock/apply-dependency-verdict.test.mjs: 50 pass, including the new refusals for another row's subject, another branch, a missing trailer, another activity and a second trailer.
    • .github/scripts/apply-patch/apply-patch.test.mjs: 446 pass, the end-to-end test among them.
    • test_babysit_dependabot.py: 83 pass. Its CdnSyncIsTheGates vectors now run 17 commit vectors and 16 message vectors through both languages, and they agree on each.
    • test_babysit_merge_policy.py (with the new subject and trailer refusals), test_diff_risk.py, test_floor_paths.py and test_merge_holds_sync.py pass. merge-holds.test.mjs: 78 pass.
    • scripts/sync-hold-floor.py --check is clean, and scripts/check-workflow-template-size.sh passes.
  • On the Dependabot pins-record exit (gap 6):
    • scripts/ci-review-lanes.test.sh: 338 pass, 0 fail. The 11 new vectors cover the cleared case and these refusals: an extra held path, a rename into place, no broker pages, a marker on another head, a fix verdict, a newer escalate marker, a marker from a user account with the App's id, a marker from another bot, unreadable markers, and no lanes App id.
    • .github/scripts/pr-unblock/review-dependency.test.mjs: 46 pass, the new gateHoldOnly case among them. .github/scripts/pr-unblock/dependency-dispatch.test.mjs: 39 pass.
    • test_floor_paths.py and test_merge_holds_sync.py: 50 pass. scripts/sync-hold-floor.py --check is clean, and a rerun of the generator changed nothing. scripts/check-workflow-template-size.sh passes, and scripts/check-affected.sh --base HEAD~1 reports 20 passed, 4 skipped.
  • selection-audit.sh trace --strict finds no selection gap for any new or changed suite, including ci-review-lanes.test.sh and review-dependency.test.mjs after gap 6.
  • On the npm tarball check (gap 7):
    • Live, on this tree's real lock and pins: verifiedFile fetched the registry tarballs for @tailwindcss/browser 4.3.5 and mermaid 12.3.0, matched each sha512 to package-lock.json, read package/dist/index.global.js (287,414 bytes) and package/dist/mermaid.min.js (5,537,838 bytes) from the real tarballs, found jsDelivr's bytes equal, and their sha256 equals the hashes pins.json records.
    • lib/cdn-pins/sync.test.mjs (and lib/cdn-pins/sync.test.sh): 15 pass, 0 fail. New cases build a real gzipped ustar tarball and lock: a tarball whose sha512 differs from the lock, jsDelivr bytes that differ from package/<file>, a tarball that does not gunzip, a lock entry with another version, an off-registry or another package's resolved, a sha1 or missing integrity, no lock entry, and a tarball without the file. Each refuses and leaves every file, the lock included, unchanged. The command line exits 1 with nothing written on a tampered file as on a 404. tarFile cases cover the prefix field, a pax path, directories, multi-block bodies, a bad checksum, a truncated archive and entry, a duplicate, a symlink entry and a malformed pax record. The repository's own check test passes.
    • .github/scripts/apply-patch/apply-patch.test.mjs: 446 pass, 0 fail. The end-to-end test now carries the head's lock as request.lock, serves the tarball, and checks that the review-cdn-pins-sync job writes request.manifest, request.lock and request.script into the work tree.
    • .github/scripts/pr-unblock/review-dependency.test.mjs: 46 pass, 0 fail, with lock in the written request and a missing head lock writing none. .github/scripts/pr-unblock/cdn-pins-sync.test.mjs: 3 pass. workflow-gates.test.mjs CDN tests: 2 pass.
    • On real npm output, with no committed archive: a test runs the npm bundled with Node (npm-cli.js beside process.execPath) to npm pack a scoped @cdn-pins-test/fixture 1.0.0 in a temp dir, offline, with --ignore-scripts and its own cache and userconfig. It checks the tarball's sha512 against the integrity npm reports, reads package/dist/fixture.js and package/package.json through tarFile, and runs verifiedFile end to end on a lock entry built from that tarball: equal jsDelivr bytes pass, other bytes are refused. A Node without its bundled npm fails the test with a message rather than skipping it. npm 11.19.0 wrote two typeflag 0 entries with POSIX ustar\000 magic; both pinned registry tarballs (@tailwindcss/browser 4.3.5, 4 entries; mermaid 12.3.0, 1,405 entries) likewise hold only typeflag 0 entries: no pax, g, GNU or directory entries. In CI, Test Node and Test Bash both install Node with setup-pinned-node, which extracts the official nodejs.org Linux release, bundled npm included. A second test runs the lock checks, now lockedTarball, over the committed package-lock.json for every package pins.json lists, mermaid and the scoped @tailwindcss/browser among them: version equal to package.json's, the canonical registry resolved, and one sha512. lib/cdn-pins/sync.test.mjs and lib/cdn-pins/sync.test.sh: 17 pass, 0 fail each. scripts/ci-review-lanes.test.sh: 338 pass, 0 fail after merge_verdict and the pins exit moved above the action-ref comment. scripts/check-affected.sh --base 3250df4079 reports 19 passed, 5 skipped. selection-audit.sh trace --strict finds no gap for sync.test.mjs, and test-tmp-cleanup, silent-skips and orphaned-fixtures pass.
    • A request built from the real lock scans clean under lib/publish-gate.mjs scanLeak, so the credential scan before upload still passes. scripts/check-workflow-template-size.sh passes, with pr-unblock.yml 522,092 bytes under the fail line. scripts/check-affected.sh --base ba8ca97fc2 reports 20 passed, 4 skipped. selection-audit.sh trace --strict finds no gap for sync.test.mjs, sync.test.sh, apply-patch.test.mjs, cdn-pins-sync.test.mjs or review-dependency.test.mjs.

Not in this change

Related

  • #18336: the pr-unblock CDN sync route and both merge gates this binds.
  • #17718 and #17844: the exact pins and SRI hashes this keeps current.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UJUn7JjbzH3qP4NugM6Ns5

…t-bumped manifest

lib/cdn-pins/package.json pins mermaid and @tailwindcss/browser at the
versions the deepening view loads; nothing installs it. A Dependabot npm
entry bumps it. lib/cdn-pins/sync.mjs sync fetches each pinned file,
hashes its exact bytes, and rewrites every CDN URL, SRI hash and CSP
source in the files pins.json lists, then pins.json. sync.mjs check is
offline: it fails while package.json and pins.json disagree, or a listed
file lacks a current URL or hash or names another version. The selected
sync.test.sh suite runs that check on the repository's own tree.

Refs: #17783

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 23, 2026 01:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T01:54:56.030126Z c66ebcb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 23, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Held by session efebda6d (GitHub Work) with the do-not-merge label, for an owner decision.

Once this pull request's Dependabot entry lands, every lib/cdn-pins bump PR fails sync.test.sh and stays red until #17783's done-when 5 route exists. No session may push to a Dependabot PR. That route adds a patch-rules.json allow class letting an unattended lane push skill text (html-report.md) and eval samples, which widens a lane's write grant and so is the owner's decision. The label comes off when the owner decides how done-when 5 goes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c66ebcbfef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/cdn-pins/sync.mjs Resolved
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d0d33ddbc8cd0e19802a76194bb40845116e0439: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

Blocking only. This lane already reviewed an earlier head (3250df40), so this review reports only CRITICAL and IMPORTANT findings. I read every hunk of both files in .claude-lane/incremental.diff: lib/cdn-pins/sync.test.mjs and lib/cdn-pins/sync.test.sh.

What changed since 3250df40:

  • The committed fixture tarball is gone. lib/cdn-pins/fixtures/balanced-match-4.0.1.tgz is no longer part of the change.
    • Both test-scope headers drop it.
    • The test that read it is replaced.
    • That tarball is the file the earlier binary-artifact hold named, so it no longer applies at this head.
  • The new test runs a local npm pack. It still runs nothing from the network or from outside the repository:
    • It finds the npm-cli.js bundled beside process.execPath, either <prefix>/lib/node_modules/npm or the Windows layout. If neither exists, it fails.
    • It writes a two-file package into a fresh tempDir.
    • It calls execFileSync(process.execPath, [npmCli, "pack", ...]) with an argument array, so no shell runs. The flags are --ignore-scripts, --offline and --no-update-notifier, plus an empty --userconfig and a cache inside the temp dir.
    • Every argument is a constant or a temp path the test made. No input from a pull request, issue or environment variable reaches the command line.
    • --ignore-scripts means no lifecycle script runs, though the package the test writes has none anyway.
  • What the test checks, using only fake fetches from memory:
    • the packed tarball's sha512 equals the integrity npm pack reports;
    • tarFile reads the packed entries;
    • verifiedFile accepts the matching CDN bytes and rejects different ones (/differs from package\/dist\/fixture\.js/). That last assertion makes the integrity check stricter rather than looser.
  • No production code changed. sync.mjs is untouched in this increment. The test only imports verifiedFile, which was already exported.

No trust control, token scope, kill switch or merge hold is widened, and no plugin manifest changed. The change only adds a short local npm pack to a test run.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on c66ebcbfef6bbe7b8a51d045a321dab994444915; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread lib/cdn-pins/sync.mjs Resolved
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed d0d33ddbc8cd0e19802a76194bb40845116e0439: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: incremental, 3250df4 → d0d33dd (blocking only)

This lane already reviewed earlier heads of this PR (blocking only: yes), so this review reports blocking findings only. I read every hunk of both files in the incremental diff. The push also deletes lib/cdn-pins/fixtures/balanced-match-4.0.1.tgz. No file in the repository still names it. This head has no blocking findings.

What changed, checked

  • lib/cdn-pins/sync.test.mjs: the test that read the committed registry tarball is replaced. The new test builds a tarball at test time with npm pack, using the npm bundled with Node.
    • It finds npm-cli.js under the Unix prefix (<prefix>/lib/node_modules) or the Windows one (<dir of node>/node_modules). If neither exists, it fails with a clear message.
    • npm pack runs with --offline --ignore-scripts, an empty --userconfig and a temporary --cache.
    • It checks the tarball's sha512 against the integrity that npm pack --json reports. It reads package/dist/fixture.js and package/package.json back through tarFile.
    • It then runs verifiedFile end to end, once with matching CDN bytes and once with different ones.
    • I checked the helpers it calls at head:
      • lockOf and tarballUrl handle the scoped name (fixtures/npm-tarball.mjs:6,42-48).
      • fetchFrom and CDN are defined at sync.test.mjs:26,43.
      • urlOf builds ${cdn}${name}@${version}/${file} (sync.mjs:32), which matches the fake CDN key.
      • The rejection regex matches the error text at sync.mjs:232.
    • Trade-off, not a finding: the test no longer compares against the real registry's dist.integrity. That is the intended way to clear the earlier binary-artifact hold.
  • test-scope lines in sync.test.mjs and sync.test.sh drop the deleted fixture.

Not verified by me: I ran nothing, including the tests.

Other criteria

  • Loosened checks. The prompt had no loosened_check_verdict:, loosened_check_patterns: or loosened_check_decision_record: lines. I used fail with no consumer entries, and did not check the citation requirement. This increment loosens no check.
  • Plugin manifests. No plugin.json or marketplace.json changed in this increment.
  • Earlier findings. Both earlier inline threads (prose version, floor hold) are marked as changed or resolved, and this increment touches neither point. Deleting the .tgz removes the file behind the earlier binary-artifact hold.

Verifier dropped 0 of 0 candidates.

kyle-sexton and others added 2 commits November 23, 2026 09:51
sync rewrote a recorded hash with no + or / in its plain form inside a
regular-expression literal, because its plain and escaped forms are
the same, and check still passed. sync now rewrites line by line: on a
line holding the escaped CDN prefix such a hash takes the escaped new
value. check flags any hash on such a line that is not a current hash
escaped.

check now also verifies the prose form: a target with prose: true must
name each package's current version as "`<name>` <version>", and any
target naming another version in that form fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton

Copy link
Copy Markdown
Member Author

Held by session f8b9f2fc (GitHub Work) with the do-not-merge label. This pull request switches on the CDN sync route from #18336, so before the label comes off it must carry the fixes for #18336's pr-review-main findings (dispositions):

  1. Both merge gates (cdnSyncRefusal and cdn_sync_refusal) admit the sync commit only by the cdn-pins-sync row's exact message (Sync the CDN pins to the bumped manifest on <ref> [dependabot skip]) and its Lane-Activity: trailer, not by the [dependabot skip] substring, with tests for a marker-bearing commit from another row being refused.
  2. lib/cdn-pins/pins.json and lib/cdn-pins/sync.mjs become enforcement floor rows in docs/conventions/pr-pipeline.yaml, with the generated copies and floor pins.
  3. A contract test against the real sync.mjs: check(root) returns string[], and sync <root> rewrites the targets.
  4. An end-to-end test over the real sync.mjs, the cdn-pins-sync.mjs patch CLI and apply-patch's cdn-pins-sync row.
  5. A test that the registry's path count stays within the row's max-files.

No session lifts the label while any of these is missing.

kyle-sexton and others added 2 commits November 23, 2026 18:16
Both merge gates (cdnSyncRefusal in dependency-classify.mjs and
cdn_sync_refusal in babysit_dependabot.py) took any lanes App commit whose
message contained [dependabot skip]. They now take only the cdn-pins-sync
row's message as apply-patch renders it for apply-cdn-pins-sync: the subject
on the pull request's head ref, a blank line, and the one trailer
Lane-Activity: pr-unblock/review-dependency. Another row's subject, another
branch, a missing or different trailer refuse as cdn-sync-message or
cdn-sync-trailer; every earlier check stays.

lib/cdn-pins/pins.json and lib/cdn-pins/sync.mjs become enforcement floor
rows, with the generated copies and the floor pins recounted after the main
merge (170 classes, 70 enforcement).

New tests: a contract test of the real sync.mjs (check returns messages; the
sync command line rewrites the targets), the patch CLI's outcomes, an
end-to-end run from request through the real script, the CLI and
apply-patch's cdn-pins-sync row to a push both gates admit, and the real
registry's path count against the row's max-files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7JjbzH3qP4NugM6Ns5
@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) lifts its hold: all five fixes in the hold condition are on 5d28c4b, checked in the diff:

  1. Both merge gates take only the cdn-pins-sync row's exact subject on the head ref plus its one Lane-Activity: trailer, with refusal tests in JS and Python.
  2. lib/cdn-pins/pins.json and lib/cdn-pins/sync.mjs are enforcement floor rows, with the copies regenerated and the pins recounted.
  3. A contract test of the real sync.mjs (check returns strings; sync <root> rewrites the targets).
  4. An end-to-end test from cdnRequest through the real script, the patch CLI and the cdn-pins-sync row to a push both gates admit.
  5. A test that the registry's 6 paths stay within the row's max-files of 6.

The label comes off next; the merge waits on CI Status, both review lanes, the pr-review-main findings and pr-verify at this head.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 23, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 5d28c4be1737ef7077e07ea012be5655ada3e6d0; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread docs/conventions/pr-pipeline.yaml Resolved
…old on the review-dependency verdict

The pins.json floor row held every Dependabot CDN bump for a person,
because the lanes App's sync commit always modifies it. Owner decision
Q154 A says such a bump merges unattended.

CI Status's require-checks step now clears the hold for a Dependabot
pull request whose one held path is lib/cdn-pins/pins.json, modified
in place, once the lanes App's newest review-dependency round marker
names the head with verdict=merge. The marker check is one function
shared with the action-ref exception. Until the verdict the step fails
with a CDN pins record message, which review-dependency.mjs's
GATE_HOLDS reads as a verdict hold, so the round runs instead of
skipping as gate-hold.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7JjbzH3qP4NugM6Ns5
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 24, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) put the do-not-merge label back for one review rework. The claude-review finding on docs/conventions/pr-pipeline.yaml:1874 is right: with lib/cdn-pins/pins.json as a floor row, the require-checks hold step stops every Dependabot CDN bump for a person, which reverses owner decision Q154 A. The fix keeps the floor rows and adds a Dependabot exit for the case where pins.json is the only held path and the lanes App's review-dependency verdict=merge marker names the head. It also handles the diff_risk rating if that holds the bump the same way. The label comes off after that push.

@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) lifts its hold again. 62778f7 fixes the claude-review floor-row finding: the floor rows stay, and the require-checks step clears a Dependabot CDN bump whose only held path is lib/cdn-pins/pins.json, once the lanes App's review-dependency verdict=merge marker names its head (owner decision Q154 A). The diff_risk side needed no change (reply). The merge waits on CI Status, both review lanes, the pr-review-main findings and pr-verify at this head.

@kyle-sexton kyle-sexton added do-not-merge Hard merge gate: do not merge while applied. and removed do-not-merge Hard merge gate: do not merge while applied. labels Nov 24, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) put the do-not-merge label back while it merges main. The branch conflicts with main in the generated hold-floor block of pr-require-checks.yml and in the floor pin counts of test_diff_risk.py and test_floor_paths.py. The merge regenerates the floor copies with scripts/sync-hold-floor.py and recounts the pins against the merged pr-pipeline.yaml. The label comes off after that push.

@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) lifts its hold. ba8ca97 merges main: the generated hold-floor block was regenerated with scripts/sync-hold-floor.py, and the floor pins were recounted against the merged pr-pipeline.yaml (169 classes, 70 enforcement, digest recomputed). sync-hold-floor.py --check is clean, the floor, diff-risk and merge-holds-sync suites pass (197 tests), and ci-review-lanes.test.sh passes (338). The merge waits on CI Status, both review lanes, the pr-review-main findings and pr-verify at this head.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 24, 2026
…ile pins before syncing

sync used to pin the SRI hash of whatever jsDelivr served. With the
route merging unattended, tampered bytes at sync time would have been
pinned as trusted.

For each package whose version changes, sync now requires the
package-lock.json entry to lock that version at its canonical
registry.npmjs.org tarball with one sha512 integrity, fetches the
tarball, checks the sha512, reads package/<file> from the ustar archive,
and records the hash only when jsDelivr's bytes equal it. Any failure
exits 1 and writes nothing. Unchanged packages are no longer fetched.

cdnRequest carries the head's lockfile as request.lock, and the
review-cdn-pins-sync container writes it into the work tree only, so the
patch still changes only pins.json and targets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7JjbzH3qP4NugM6Ns5
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 24, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) put the do-not-merge label back for one security fix. pr-review-main's security lane raised one SUGGESTION at ba8ca97: lib/cdn-pins/sync.mjs:128 pins whatever bytes jsDelivr serves, unchecked against the npm package. The fix makes sync verify the npm tarball the lockfile pins (sha512 integrity) and require the pinned file inside it to match jsDelivr's bytes before it writes anything. The label comes off after that push.

@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) lifts its hold. f05eaa8 closes pr-review-main's security suggestion (lib/cdn-pins/sync.mjs:128). For each bumped package, sync now requires package-lock.json to lock that version at its canonical registry.npmjs.org tarball with one sha512 integrity. It fetches the tarball, checks the sha512, reads package/<file> from it, and pins the hash only when jsDelivr's bytes equal that file; any failure exits 1 and writes nothing. A live run against the real lock matched both packages. The merge waits on CI Status, both review lanes, the pr-review-main findings and pr-verify at this head.

@kyle-sexton kyle-sexton added do-not-merge Hard merge gate: do not merge while applied. and removed do-not-merge Hard merge gate: do not merge while applied. labels Nov 24, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) put the do-not-merge label back for pr-review-main's two claude-review findings at f05eaa8 (0 critical):

  1. IMPORTANT: tarFile and verifiedFile are tested only on hand-built tar and lock fixtures (docs/review/tests.md). The fix commits a small tarball captured from the npm registry with its lock entry and tests tarFile on it, and checks verifiedFile's lock preconditions against the committed lib/cdn-pins/package-lock.json for both pinned packages, the scoped one included.
  2. SUGGESTION: the CDN pins exit in pr-require-checks.yml sits between the action-ref exception's comment and its code. It moves above that comment.

The label comes off after that push.

tarFile and the lock checks in verifiedFile were tested only on hand-built
ustar archives and lock entries. Commit @isaacs/balanced-match 4.0.1, a
4,438-byte MIT tarball npm 11.3.0 packed, as captured from the registry,
and read package/package.json from it, with its registry sha512 recorded
in the test.

Factor the lock checks into lockedTarball and run them over the committed
package-lock.json for every package pins.json lists (mermaid and the
scoped @tailwindcss/browser), at the versions package.json pins.

Move merge_verdict and the CDN pins exit above the action-ref exception's
comment, so that comment sits on its own code. Behavior is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7JjbzH3qP4NugM6Ns5
@kyle-sexton

Copy link
Copy Markdown
Member Author

Both pr-review-main findings are fixed in 3250df4.

Finding 1 (IMPORTANT, lib/cdn-pins/fixtures/npm-tarball.mjs:9): fixed.

  • Real registry tarball: lib/cdn-pins/fixtures/balanced-match-4.0.1.tgz is @isaacs/balanced-match 4.0.1 (MIT, 4,438 bytes, packed by npm 11.3.0), committed byte for byte as https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz serves it. The test at lib/cdn-pins/sync.test.mjs:254 checks the file's sha512 against the registry's dist.integrity and reads package/package.json from it through tarFile (lib/cdn-pins/sync.mjs:149).
  • Header types npm really writes: this tarball and the two pinned ones (@tailwindcss/browser 4.3.5, 4 entries; mermaid 12.3.0, 1,405 entries) hold only typeflag 0 entries with POSIX ustar\000 magic. None has a pax x, a g global header, GNU magic or a directory entry, and tarFile reads package/dist/index.global.js and package/dist/mermaid.min.js from the pinned ones. tarFile was not changed. The pax, prefix and directory branches keep their hand-built cases (lib/cdn-pins/sync.test.mjs:230), since npm emits none of them for these packages.
  • Real lock entries: the lock preconditions are now lockedTarball (lib/cdn-pins/sync.mjs:206), which verifiedFile calls (lib/cdn-pins/sync.mjs:220). The test at lib/cdn-pins/sync.test.mjs:262 runs it, offline, over the committed lib/cdn-pins/package-lock.json for every package pins.json lists, mermaid and the scoped @tailwindcss/browser among them. For each one, version must equal the version package.json pins, resolved must equal the canonical registry tarball URL, and integrity must be a single sha512.
  • Selection: the fixture is in the test-scope headers of lib/cdn-pins/sync.test.mjs:1 and lib/cdn-pins/sync.test.sh:2. selection-audit.sh trace --strict shows no gap for either suite.

Finding 2 (SUGGESTION, .github/workflows/pr-require-checks.yml:7537): fixed.

merge_verdict (now line 7527) and the Q154 A CDN pins exit (7535-7548) sit above the action-ref exception's comment (7549-7560), so that comment is directly above its own if [ "$AUTHOR_ID" = 49699333 ] block (7561). Only comment lines moved. scripts/ci-review-lanes.test.sh: 338 pass, 0 fail.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 24, 2026
@github-actions github-actions Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review holds this pull request for a person (binary-artifact) at 3250df4079f748e33705cc28e69ffde274574afc.

1 changed file(s) are executables or archives no review reads, and the base branch's binary allowlist does not list them. A person reviews each file. To allow one, a separate pull request adds its <sha256> <path> line to the allowlist file on the base branch; this branch then updates from the base.

  • lib/cdn-pins/fixtures/balanced-match-4.0.1.tgz (gzip, sha256 b4593f0b61a94bb72521b5868b9da79e5f26b353d2cb958a1822adc3759915b0)

claude-lane: claude-security-review

@github-actions

Copy link
Copy Markdown
Contributor

claude-review holds this pull request for a person (binary-artifact) at 3250df4079f748e33705cc28e69ffde274574afc.

1 changed file(s) are executables or archives no review reads, and the base branch's binary allowlist does not list them. A person reviews each file. To allow one, a separate pull request adds its <sha256> <path> line to the allowlist file on the base branch; this branch then updates from the base.

  • lib/cdn-pins/fixtures/balanced-match-4.0.1.tgz (gzip, sha256 b4593f0b61a94bb72521b5868b9da79e5f26b353d2cb958a1822adc3759915b0)

claude-lane: claude-review

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 24, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) put the do-not-merge label back. The real-output fixture lib/cdn-pins/fixtures/balanced-match-4.0.1.tgz tripped both lanes' binary-artifact hold at 3250df4. Adding it to the binary allowlist would loosen a security control, so the next push removes the committed archive instead. The test then has npm write the tarball at test time (npm pack, offline, isolated cache), so tarFile and verifiedFile still run on npm's real tar output. The label comes off after that push.

The committed registry tarball held the pull request for a person on
binary-artifact: no review reads an archive, and listing it would loosen
the binary allowlist. The real-output test now runs the npm bundled with
Node (npm-cli.js beside process.execPath) to pack a scoped fixture
package in a temp dir, offline, with scripts off and its own cache and
userconfig. It checks the tarball's sha512 against the integrity npm
reports, reads package/dist/fixture.js and package/package.json through
tarFile, and runs verifiedFile end to end on a lock entry built from that
tarball, refusing a CDN body that differs. A Node without its bundled npm
fails the test with a message instead of skipping it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7JjbzH3qP4NugM6Ns5
@kyle-sexton

Copy link
Copy Markdown
Member Author

Session 8f53d784 (GitHub Work) lifts its hold. d0d33dd removes the committed tarball that tripped both lanes' binary-artifact hold. The real-output test now has npm write the archive at test time (npm pack --offline with an isolated cache and an empty userconfig). It checks the tarball's sha512 against the integrity npm reports, reads package/dist/fixture.js and package/package.json through tarFile, and runs verifiedFile end to end on it. A missing npm fails the test; it does not skip. The needs-human label comes off once both lanes show no binary hold at this head. The merge waits on CI Status, both review lanes, the pr-review-main findings and pr-verify.

@kyle-sexton kyle-sexton removed do-not-merge Hard merge gate: do not merge while applied. needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. labels Nov 24, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

pr-review-main at d0d33dd: security 0 findings, claude-review 1 SUGGESTION, 0 critical.

The suggestion (lib/cdn-pins/pins.json:77) is right. After the first automated bump, html-report.md keeps its dated "As of 2026-11-15" and "checked ... on 2026-11-21" sentences and a recheck trigger that says to change the pins by hand, which this PR replaces with the manifest bump plus node lib/cdn-pins/sync.mjs sync. Disposition: a follow-up pull request from session 8f53d784, right after this one merges, replaces those sentences with a pointer to lib/cdn-pins/pins.json and sync.mjs. It is a one-paragraph skill-text edit, and holding this PR another review round for it would delay the merge by about an hour. No CDN bump can land before it, because the Dependabot entry has a 3-day cooldown.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 2078019 Nov 24, 2026
168 of 174 checks passed
@kyle-sexton
kyle-sexton deleted the feat/17783-cdn-pins-dependabot branch November 24, 2026 02:57
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rendered-views: keep CDN pins and SRI hashes current through Dependabot

1 participant