Repository navigation
Description
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
- PR: Simplify repository configuration — schema cleanup, layered repo+local config, onboard skill, validator #2105
- BRC implement transcript:
.egg-state/brc-history/2073-implement.mdonegg/issue-2073 - GHA review: posted 2026-04-26T05:05:21Z by
egg-reviewer[bot]
Things the in-pipeline review explicitly signed off on, GHA flagged as blocking
-
Path traversal in
_handle_validate_repo_config(orchestrator/mcp_tools.py:1602-1635).reviewer_securityevaluated this exact handler at transcript line 5230 and concluded: "appropriate read-only delegation matching the existingvalidate_configtool's privilege model." GHA reviewer says it's a path-traversal bug — agent-suppliedcheckout_path/user_pathflow intoPath(...).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. -
__checkout__synthetic key dead-end betweenshared/egg_config/repos.pyandsandbox/egg_lib/docker.py.reviewer_codeat transcript line 3272 noted: "config/repo_config.py:679filters 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.yamlin your repo with no entry in the user file, and_get_local_repo_path("__checkout__")matches nothing, sobuild_commands/persist/watch_filesare silently dropped. In-pipeline review treated a feature-breaking dead-end as a comment hygiene nit. -
Silent exception swallowing in
config/repo_config.py:_load_configandsandbox/egg_lib/docker.py:_load_repos_config(bareexcept Exception:falls back to the unmerged user dict). Flagged as non-blocking byreviewer_securityat 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 duringegg-orchruns — operators see a working pipeline that quietly ignores their config. -
Symlinked
.egg/repositories.yamlsilently disabled.reviewer_securityline 3612: "worth tightening with aif candidate.is_symlink(): return Nonefor 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)
-
Detector outputs reproduce the exact bugs the same PR's validator is built to catch —
PythonPippersists only.venvwhilepip installwrites to system site-packages;NodePnpm/NodeYarninstall pnpm/yarn globally but persist only project-localnode_modules;GoDetectorpersists/usr/local/gowhile installing into/usr/local.reviewer_code's cross-partition pass enumeratedhandler ↔ 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. -
Doc claims behavior the code doesn't implement (3 places):
docs/guides/repo-config.md:300-305tells migrators they can omitwatch_files/checksbecause "the loader will infer them" — the merge layer inshared/egg_config/repos.pydoes no such inference (theinfer_*helpers exist inconfig/repo_config.pybut are never called from the merge path). The same section at line 312 claims stalerepo_settings:blocks "will replace the repo defaults";_merge_repo_blockactually leaf-merges. Rollbacksedsnippet at:347-355has placeholders that aren't valid YAML. -
Doc YAML template invalid against schema (
docs/guides/repo-config.md:120-128):watch_files:nested inside thebuild_commands:block.ALLOWED_REPO_DEFAULTS_KEYSrequires it at the top level — copy-paste produces a schema error on firstegg validate-config. -
Test correctness issues:
test_docker_setup_regressions.pyhand-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_goldenself-seeds first run (broken detector → broken golden, pinned forever);test_zero_major_hard_failsaccepts"0.1"while its name says it should hard-fail. -
Path traversal in skill writes (
skills/onboard-repo/SKILL.md) — agent-supplied<repo-path>flows into<repo-path>/.egg/repositories.yamlwrites 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:, swallowedNones, 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
- Contract-population gap (
phases: []/acceptance_criteria: []) — covered by _populate_contract_from_plan silently leaves contract.phases / acceptance_criteria empty when plan-draft commits aren't visible in orchestrator worktree #2124. reviewer_codefan-out prompt / contract-load nits — covered by Cleanup: reviewer_code fan-out prompt + contract-load nits from PR #2061 #2067.- Tester ACK on per-repo
checks:exit codes — covered by Tester ACK should be gated on per-repochecks:exit codes, not free-form prose #2123.
Refs: PR #2105, PR #2061 (#1965), #1997, #2062, #2067, #2124.
Activity
jwbron commentedon Apr 26, 2026
Closing as a postmortem — the actionable work has been broken out into focused tickets:
reviewer_codealongside fan-out + lenses (headline; Option F). Holistic runs always as the floor, fan-out remains additive above the existing >10 files OR >500 LOC threshold.reviewer_securityandreviewer_concurrencyon large diffs (Option A; addresses RC3).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_concurrencyto 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.
Add reviewer_code_holistic CRITICAL role alongside fan-out (#2126) (#…
review-criteria: recalibrate severity per #2128 (#2197)