Close the loop: recursive review, agent enforcement, a recall index, and dogfooded distribution - #56
Open
kridaydave wants to merge 37 commits into
Open
Close the loop: recursive review, agent enforcement, a recall index, and dogfooded distribution#56kridaydave wants to merge 37 commits into
kridaydave wants to merge 37 commits into
Conversation
…ble lines, shared token scanner
…dget caps References found in a reviewed payload (npm lifecycle scripts, PKGBUILD npm/bun delivery, wheel .data/scripts) are re-reviewed through the same engine: Verdict gains a recursive ChildReview array (single source of truth for CLI/CI/MCP), policy gains [recursion] caps, and R24/R25/R26/R27 disclose references, caps, cycles, and roll-ups fail closed. The child memo and shared per-ecosystem registries mean referenced packages are never re-downloaded mid-review.
… MEDIUM The review card renders each child review's delivery chain, band, and worst findings (bounded, never silent). R23_NPM_DELIVERY graduates from INFO now that recursion resolves what delivery lines point at, with the three benign-corpus electron fixtures pinned as true positives. New fuzz target covers the install-reference scanner; two pre-existing fuzz targets were missing the libfuzzer import and never compiled.
…nreviewable shapes
… substitution-hidden managers
…ides in gated installs
…c --package, respect comments
…ld-in, staleness policy
…ame normalization, serve read timeout
…d, full npm platform matrix
kridaydave
force-pushed
the
feat/close-the-loop
branch
from
September 12, 2026 16:56
4071f25 to
07b805c
Compare
P1: shared child_ecosystem routing (cargo/AUR no longer reviewed as npm), basename manager matching for absolute-path invocations, env-redirect deny/disclose shapes, unpinned refs always resolve latest. P2: PyPI-scoped canonicalization, quoted-manager denies, continuation joining, recall normalization, agent ignores BLUELINE_POLICY without --policy, 11-manager shims, R28/R00 escalation, packaging/CI matrix and dogfood/mutation fixes, ARCHITECTURE docs.
…ogfood health gate Extend mutant coverage to install_ref/recursive/agent/recall/shim plus pkgbuild/render/policy and pin every surviving mutant with boundary tests: stdin/size caps, validate bounds, version equivalence, stale and sequence edges, serve limits, cache reload, manager arms and guards. Drop the unchanged_count dogfood assertion: version-bump PRs legitimately evaluate with zero unchanged packages. Fix yay/paru verb search starting past flag-verbs so 'yay -S foo' resolves instead of scanning silent.
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.
Close the loop: recursive review, agent enforcement, a recall index, and dogfooded distribution
Four campaigns took blueline from a single-release delta reviewer to a
closed-loop, agent-enforced, networked, self-distributed supply-chain
gate. The goal mandated one branch for the entire four-phase run, so
this is one PR instead of the stacked per-campaign set — the campaign
and slice boundaries are recorded as rulings in
TODO.md(night-runconvention) and every slice passed the fmt/clippy/test gate with
adversarial review rounds before the next one started.
Summary:
worm, Atomic Arch) delivered through a second-order install nobody
reviewed. Now every install reference inside a reviewed payload — npm
lifecycle scripts, PKGBUILD
npm install/bundelivery, wheel.data/scripts— is itself reviewed: depth-capped (policy[recursion] max_depth, default 3), cycle-safe (A → B → A is cut anddisclosed), memoized so referenced packages are never re-downloaded,
and rolled up into the parent verdict (
R24–R27; a child HIGH canBLOCK the parent).
R23_NPM_DELIVERYgraduates INFO → MEDIUM now thatthe delivery line is resolved. The verdict JSON grows a
recursivearray (delivery chain, band, findings), so the card, CI reports, and
the MCP tool all inherit it. New rules:
R24–R28.blueline agent reviewgives autonomous agents a policy-bound, never-interactive gate (JSON
verdict on stdout, exit 0/2/1, no baseline blessing, audit trail with
the agent's identity).
blueline agent gateis the hook binding forClaude Code
PreToolUseand CursorbeforeShellExecution— onescanner grammar, fail closed on every error path, dynamic and
registry-override shapes denied.
blueline shim install npm npx pip pip3 cargo yay paruroutes real installs through the gate, with thebypass list documented rather than hidden. Recipes and the honest
bypass list are in the README.
box:
blueline recall serve(std-only loopback HTTP),recall sync(bounded fetch, fail-closed validation, monotonicsequence),
recall export-candidates(audit log → human curation).Index hits fold into the advisory engine and BLOCK via the existing
R09 path; staleness is disclosed (
R28) and can BLOCK by policy.The SQLite store is untouched — the snapshot lives in a validated
JSON file.
carry the full published platform matrix (a darwin/macOS user used to
get a launcher with no binary); the release workflow builds the
missing linux-arm64-musl package and attests SLSA build provenance
for the GitHub-release binaries. crates.io metadata, a Homebrew
formula, and an AUR scaffold (reviewed by blueline's own PKGBUILD
heuristics — see
tests/self_review.rs) ship in-repo. Nothing ispublished: registry pushes stay a human-confirmed step.
blueline ciruns on our ownpackage-lock.jsonandCargo.lockin CI; verified locally green (PASSED, exit 0 on both),agent review serde_json@1.0.151→ LOW,npx bluelinecold startworks through the launcher.
Use-it evidence (real binary, real runs):
blueline review a@1.0.0→ BLOCK atscore 100, card renders
delivered via: a@1.0.0 → npm:b@1.0.0, thechild's backdoored postinstall surfaces as BLOCK, R27 rolls it up —
nothing executed (pinned in
tests/recursive_review.rs).webtorrent-desktop: real RPC + clone + diff; R23fired at MEDIUM on the npm delivery lines (bare
npm installcorrectly produces no recursive child).
npm installthrough an installed shim in a sandboxed project:unapproved package blocked (no
node_modulescreated), allowlistedpackage installed for real; Claude Code and Cursor hook payloads
denied/allowed with
agent:claude-code/agent:cursoraudit rows.clean-looking revoked release BLOCKed via
blueline-recall; staleindex disclosed at MEDIUM and escalated to BLOCK with
block_on_stale; backward-sequence sync refused(
tests/recall_cli.rs).Review process: every slice ran the fmt/clippy/test gate and three
subagent reviewers (adversarial security, test auditor, fresh-eyes) in
parallel; P1/P2 findings were fixed and re-reviewed until clean. The
agent gate in particular went through three hardening rounds (error
paths now deny, per-ecosystem registry routing, flag/override/comment
scanner shapes) with empirical verification of every fixed shape.
PR made by zai-start-plan/glm-5.3-flash from zcode on behalf of Kriday.