Skip to content

BRC review missed 14 GHA blockers on PR #2105 — fan out lens reviewers, expand cross-partition pass categories #2125

Closed

Description

@jwbron

PR #2105 (the issue #2073 layered repo-config rollout — the first SDLC pipeline PR opened after #2061 merged) shipped to GitHub with the in-pipeline BRC reviewers (reviewer_code + the new reviewer_security / reviewer_concurrency lenses) at full ACK consensus. The GHA egg-reviewer then posted 14 blocking findings plus 5 non-blocking notes. Several of those blockers were architectural and security defects that the in-pipeline review either explicitly evaluated and signed off on, or labelled as non-blocking nits.

This isn't a pure regression — the in-pipeline review caught two CRITICAL security bugs in earlier rounds (path traversal in shared/egg_config/repos.py:_is_denylisted_abs_path, command injection in shared/egg_config/onboard_detectors.py::GoDetector — both fixed before the final commit). Fan-out engaged correctly (6 subagents, partitioned by TASK-N-N) and the parent ran a cross-partition pass. So the new machinery from #2061 worked, but the gap-to-GHA on a 33K-LOC / 41-file PR is large enough to call out for a tightening pass before the next big SDLC PR ships.

Evidence

Things the in-pipeline review explicitly signed off on, GHA flagged as blocking

  1. Path traversal in _handle_validate_repo_config (orchestrator/mcp_tools.py:1602-1635). reviewer_security evaluated this exact handler at transcript line 5230 and concluded: "appropriate read-only delegation matching the existing validate_config tool's privilege model." GHA reviewer says it's a path-traversal bug — agent-supplied checkout_path / user_path flow into Path(...).read_text() with no workspace-root constraint. Threat-model mismatch: the in-pipeline lens treats "read-only, no shell-out" as sufficient; GHA treats path-traversal-into-readable-targets as a bug class regardless of whether the handler writes.

  2. __checkout__ synthetic key dead-end between shared/egg_config/repos.py and sandbox/egg_lib/docker.py. reviewer_code at transcript line 3272 noted: "config/repo_config.py:679 filters out the synthetic __checkout__ key … worth a comment naming the synthetic key so future authors don't widen __ to swallow legitimate keys." GHA reviewer says this is the primary advertised use case — drop a .egg/repositories.yaml in your repo with no entry in the user file, and _get_local_repo_path("__checkout__") matches nothing, so build_commands / persist / watch_files are silently dropped. In-pipeline review treated a feature-breaking dead-end as a comment hygiene nit.

  3. Silent exception swallowing in config/repo_config.py:_load_config and sandbox/egg_lib/docker.py:_load_repos_config (bare except Exception: falls back to the unmerged user dict). Flagged as non-blocking by reviewer_security at line 3610: "Outcome is safe (malicious repo-file entries don't ship), but … not blocking because the safety floor still holds." GHA reviewer makes the same observation but escalates: a repo-defaults file that violates the persist denylist or has a schema error produces zero feedback during egg-orch runs — operators see a working pipeline that quietly ignores their config.

  4. Symlinked .egg/repositories.yaml silently disabled. reviewer_security line 3612: "worth tightening with a if candidate.is_symlink(): return None for defence-in-depth, particularly before promoting reviewer_security from advisory to deadlock-capable (Specialised reviewer findings need severity-based flagging in BRC consensus #1997)." GHA: this is the one case where failing loud is right — a symlink suggests deliberate intent and silently dropping it means the user thinks their config is loaded when it isn't.

Things the in-pipeline review missed entirely (GHA-blocking)

  1. Detector outputs reproduce the exact bugs the same PR's validator is built to catch — PythonPip persists only .venv while pip install writes to system site-packages; NodePnpm / NodeYarn install pnpm/yarn globally but persist only project-local node_modules; GoDetector persists /usr/local/go while installing into /usr/local. reviewer_code's cross-partition pass enumerated handler ↔ allowlist, route ↔ schema, fixture ↔ Dockerfile/symlink, and import-graph cycles — but didn't include "generator output ↔ validator/consumer rules in the same PR", so the detector ↔ validator pair was never simulated.

  2. Doc claims behavior the code doesn't implement (3 places): docs/guides/repo-config.md:300-305 tells migrators they can omit watch_files / checks because "the loader will infer them" — the merge layer in shared/egg_config/repos.py does no such inference (the infer_* helpers exist in config/repo_config.py but are never called from the merge path). The same section at line 312 claims stale repo_settings: blocks "will replace the repo defaults"; _merge_repo_block actually leaf-merges. Rollback sed snippet at :347-355 has placeholders that aren't valid YAML.

  3. Doc YAML template invalid against schema (docs/guides/repo-config.md:120-128): watch_files: nested inside the build_commands: block. ALLOWED_REPO_DEFAULTS_KEYS requires it at the top level — copy-paste produces a schema error on first egg validate-config.

  4. Test correctness issues: test_docker_setup_regressions.py hand-builds manifest entries instead of calling the real _classify_persist_for_manifest (so a regression there wouldn't break the regression test); test_onboard_detectors.py:_load_or_write_golden self-seeds first run (broken detector → broken golden, pinned forever); test_zero_major_hard_fails accepts "0.1" while its name says it should hard-fail.

  5. Path traversal in skill writes (skills/onboard-repo/SKILL.md) — agent-supplied <repo-path> flows into <repo-path>/.egg/repositories.yaml writes with no workspace-root check.

Root causes

# Gap Where
RC1 Severity miscalibration on architectural defects reviewer_code and reviewer_security criteria don't make explicit that "feature silently fails" / "primary use case dead-ends" / "operator gets no signal of misconfiguration" are blockers, not nits.
RC2 Threat-model mismatch in reviewer_security shared/prompts/security-review-criteria.md enumerates "handler ↔ validator path mismatch" but doesn't enumerate path-traversal in MCP-tool input handlers or skill-driven file writes. The lens approved a read_text() of agent-supplied paths because no shell-out / no write was involved.
RC3 Lens reviewers run single-pass against full diff #2061 fanned out reviewer_code but left reviewer_security and reviewer_concurrency as single-pass calls. reviewer_security caught the first path-traversal (in repos.py) but missed the second (in mcp_tools.py) and the third (in the skill). One reviewer reading 33K LOC is the bottleneck.
RC4 Cross-partition pass categories too narrow orchestrator/routes/pipelines.py lines 4669-4681 enumerate #1964-derived patterns (handler↔allowlist, route↔schema, fixture↔Dockerfile, import-graph cycles, "unguarded call site"). It doesn't enumerate "generator output ↔ consumer rules in the same PR" — exactly the detector↔validator class — or "doc-claimed behavior ↔ code-implemented behavior".
RC5 No documentation-correctness lens 5+ of GHA's blockers are doc/code mismatches (rollback sed broken, migration claims inference that doesn't exist, YAML example invalid). Nothing in the lens roster checks docs. reviewer_code's scope-preamble explicitly excludes them on the documenter slice; reviewer_security / reviewer_concurrency don't cover docs either.
RC6 Test-correctness not first-class Self-seeding goldens, hand-built fixtures that bypass the production code path, and name-vs-behavior contradictions are recurring blockers. The reviewer-code criteria mentions tests but doesn't enumerate these failure modes.
RC7 Lost the holistic scope when fan-out replaced single-pass #2061 swapped single-pass reviewer_code for slice-by-slice subagents + a parent cross-partition pass enumerated against a fixed checklist. The "step back, read the whole diff, ask 'does the primary use case actually work end-to-end?'" framing has no home in the new design. The __checkout__ dead-end is the canonical example: no slice owns "is the primary advertised use case wired end-to-end?", and the parent's fixed checklist doesn't contain that question either.

The phases: [] / acceptance_criteria: [] fan-out silent-skip path that #2124 covers is a separate issue — fan-out actually engaged on #2105 because the reviewer pulled partition labels from the plan-draft markdown rather than the structured contract. So tightening the contract-population path doesn't fix the issues called out here.

Proposed approaches

The two headline recommendations are A (fan out lenses) and F (restore the holistic generalist alongside fan-out). Together they cover the largest fraction of GHA's blockers on this PR — A would catch the second / third path traversal that single-pass reviewer_security missed at scale; F would catch the architectural-coherence and feature-end-to-end defects that no slice owns. C is a cheap prompt-only complement that should ship with either. B / D / E are independently shippable refinements.

A. Fan out reviewer_security and reviewer_concurrency on large diffs, same threshold as reviewer_code (>10 files OR >500 LOC), same partition strategy, same parent cross-partition pass. Right now one security review reading 33K LOC is the bottleneck that lets the second/third path traversal slip through. Headline.

F. Restore a single-pass holistic reviewer_code alongside fan-out + lenses. Add a distinct role (e.g. reviewer_code_holistic) that always runs single-pass against the whole diff, with an explicit scope preamble that's complementary to the fan-out reviewer's slice-by-slice work, not redundant. The preamble should make the holistic role's job clear:

  • "Don't verify every line — the fan-out reviewer covers that."
  • "Read the diff once with the whole PR in mind. Ask: does the primary advertised use case actually work end-to-end? Walk it: a user does X, the code path is A → B → C, does C produce what A promised? (The __checkout__ dead-end on Simplify repository configuration — schema cleanup, layered repo+local config, onboard skill, validator #2105 is the canonical miss.)"
  • "For every behavior promised in docs, grep that the code does it. For every code path that emits user-facing output, find the doc that documents it."
  • "Look for synthetic keys / sentinels / 'magic' values used in one module — confirm every consumer in another module recognises them."
  • "Look for silent fallbacks (except Exception:, swallowed Nones, no-op default branches) where the operator would expect a signal."

Both reviewers feed into consensus as CRITICAL. Distinct roles keep their NACKs from being averaged together — a holistic NACK on architectural coherence shouldn't be drowned out by 6 subagent ACKs on slice-correctness, and vice versa. Headline.

B. Expand the cross-partition consistency pass enumeration in orchestrator/routes/pipelines.py:4669-4681. Add explicit categories:

  • generator output ↔ consumer rules in the same PR (detector ↔ validator, encoder ↔ decoder, schema-emitter ↔ schema-validator)
  • doc-claimed behavior ↔ code-implemented behavior (every documented snippet should run; every "X infers Y" claim should grep-resolve to a call site)
  • synthetic-key / sentinel coordination across modules (the __checkout__ class)

(Note: B and F overlap — F's holistic preamble naturally covers these categories. If F lands, B becomes optional belt-and-braces; if F doesn't land, B is the consolation.)

C. Recalibrate severity in the criteria files. shared/prompts/code-review-criteria.md and security-review-criteria.md should make explicit that the following are blocking, not non-blocking:

  • "primary use case silently no-ops" (the __checkout__ dead-end)
  • "operator-facing misconfiguration produces no signal" (silent exception fallbacks where the safety floor holds)
  • "workspace-rooted file path supplied by an agent flows into Path(...).read_text() without a prefix check" (the MCP-tool path-traversal class)

D. Add a doc-correctness lens. A new reviewer_docs (or a directive in reviewer_code's criteria for the docs slice) that grep-checks: every code reference resolves; every documented YAML parses against the schema; every documented shell snippet runs cleanly in a dry-run; every "inferred" / "auto-derived" claim has a callgraph hit.

E. Promote reviewer_security / reviewer_concurrency to CRITICAL — already tracked in #2062 + #1997. The two NACK rounds in #2105's transcript were both driven by reviewer_security, and they caught real security bugs that would otherwise have shipped. Promotion is overdue once #1997 lands.

Non-trivial design call: do we even need fan-out + lenses?

Before adding more machinery, worth flagging the meta-question: the GHA egg-reviewer is the same single-pass reviewer_code running once more on the full PR, and it caught all 14 blockers the in-pipeline 8-agent review missed. That's evidence that prompt + criteria quality dominates review structure — more reviewers reading the same incomplete checklist three ways doesn't help.

A defensible alternative is to revert to single-pass per role with sharply better criteria, plus a hard cap on PR size that triggers auto-split. The argument: if no human reviewer would accept a 33K-LOC / 41-file PR, the SDLC pipeline shouldn't be opening one either, and #2105's strain is upstream-of-reviewer.

The counter-argument is that the 2 CRITICAL bugs the lens approach caught early on #2105 (path traversal in repos.py, RCE in GoDetector) are exactly the bugs you can't ship — they would have leaked to GHA without fan-out + lens. Catching them in-pipeline saves a round-trip even if the rest of the gap closes elsewhere.

The Option F + A + C combo is the both-and: keep the lens / fan-out machinery for the catches it makes, and restore the holistic generalist for the architectural coherence questions no slice owns. The cost is more compute, justified if the in-pipeline-vs-GHA gap matters (it does — every GHA blocker is a wasted human review cycle).

Out of scope

Refs: PR #2105, PR #2061 (#1965), #1997, #2062, #2067, #2124.

Activity

  1. reopened this on Apr 26, 2026
  2. jwbron commented on Apr 26, 2026

    @jwbron
    OwnerAuthor

    Closing as a postmortem — the actionable work has been broken out into focused tickets:

    Option B (expanding cross-partition consistency-pass categories) is folded into #2126's preamble — F's "primary use case end-to-end / docs ↔ code / synthetic-key coordination" framing naturally covers it.

    Option E (promoting reviewer_security / reviewer_concurrency to CRITICAL) is already tracked in #2062 / #1997 — not duplicated here.

    This issue stays as the postmortem record; the evidence and root-cause analysis above remain the reference for the four broken-out tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions