Repository navigation
Description
Problem
The tester role's confirmation was honored in PR #2105, with the tester explicitly attesting "The full tests/ suite has 6694 passes plus 5 unrelated pre-existing failures" and earlier ACKing the coder after make lint (mypy) was fixed. Consensus closed and the PR opened. CI then immediately failed with two failures:
- Unit Tests —
orchestrator/tests/test_mcp_tools.py::TestToolRouting::test_all_tools_registered. The PR added a new MCP tool (validate_repo_config) toorchestrator/mcp_tools.pybut did not update the registration test fixture. Test was never run — the tester's "fulltests/suite" scope missedorchestrator/tests/. - YAML Lint — six new golden files (
tests/shared/egg_config/golden/*.yaml) added by the tester itself fail yamllint with[indentation] wrong indentation: expected 2 but found 0. Tester never re-ranmake lint-yamlagainst its own commit.
Both failures share one shape: the tester's attestation was free-form prose ("tests pass", "lint passes after mypy fix") with a partial scope, and BRC consensus accepted it.
Why the BRC re-review mechanism didn't catch this
It's not a re-review bug. _un_confirm_stale_reviewers() and invalidate_overlapping_acks() in orchestrator/peer_consensus.py work correctly — we observed CONSENSUS_RE_REVIEW fire for reviewer_concurrency in this same pipeline when tester re-proposed v2. The gap is upstream: the tester's attestation itself was scoped narrowly, so even after re-review, the same incomplete result was re-confirmed.
The right scope is per-repo, not hardcoded
config/repositories.yaml already defines a per-repo checks: block:
repo_settings:
some-org/some-repo:
checks:
- name: lint
command: make lint
- name: test
command: make test-allThese are the declared quality gates for that repo. They're the gates CI runs. They're the gates the autofixer pulls from. They should be the gates the tester gates its ACK on — for any repo, not just egg.
Today, the tester contract (shared/egg_contracts/agent_roles.py::TESTER_ROLE.responsibilities) says only:
"Run linters and type checkers, apply auto-fixes where possible / Report test coverage, lint/type-check results, and document deficiencies found"
— silent on which command, which scope, or whether the attestation is verifiable. Whatever the agent decides to run becomes the de facto contract.
Likewise REVIEWER_CONTRACT_ROLE.responsibilities:
"Verify acceptance criteria are met / Check task completion status / Validate contract consistency"
— silent on whether to independently re-run the declared checks: against the producer's final commit. So reviewer_contract ACKed without verifying.
Suggested directions
Pick one or combine — exact shape is a planning question.
- Tighten the tester contract to require running every entry in the per-repo
checks:list against the producer's current commit and reporting each exit code. Free-form "tests pass" prose stops being acceptable; the BRCproposepayload should carry a structuredchecks_passed: [{name, command, exit_code, duration_s}, ...]field, and the orchestrator'scheck_confirm_guardshould reject the proposal if any exit_code is non-zero or if the payload's commit SHA doesn't match the current proposal SHA. - Have reviewer_contract re-run all
checks:against the producer's final commit before ACKing. Cheap insurance against tester-scope drift, and the same code path the autofixer uses already loads thechecks:block viaget_repo_checks(repo)inconfig/repo_config.py. - Plan-phase responsibility: when a task adds a new MCP tool, a new public API, or any other module-level registration that has a corresponding fixture/registration test, the plan should explicitly enumerate the fixture file as a required edit. The orchestrator MCP tool registration test is one of several "registration witnesses" that exist (probably similar tests for agent roles, gateway routes, etc. — worth a sweep). Doesn't replace 1 or 2; complementary.
The first option is cheapest and pins the gap at the source. It also makes the contract repo-config-driven instead of egg-specific — every onboarded repo's checks: block becomes its own attestation contract.
Interaction with #2042
make test is now changeset-aware via #2042's grimp selector. If a repo's checks: lists command: make test, the tester runs the narrowed selector. That's correct except when the diff touches a registration site (an MCP tool registry, a role enum, etc.) that has a hardcoded-fixture test elsewhere whose import path may or may not be in the grimp graph reachable from the changed file. Worth a follow-up: either the selector should escalate to all-roots when changed files match a "registration site" allowlist, OR the per-repo checks: for production paths should specify make test-all (or pytest with no path arg). Out of scope for this ticket; note it for #2042 follow-up.
Evidence
- PR Simplify repository configuration — schema cleanup, layered repo+local config, onboard skill, validator #2105 — BRC consensus reached at 01:22:09; CI failed at 01:28
- Failing tests:
orchestrator/tests/test_mcp_tools.py::TestToolRouting::test_all_tools_registered(Unit Tests) +tests/shared/egg_config/golden/*.yaml(YAML lint) - Tester's attestation: NACK at 01:06:14 in
.egg-state/brc-history/2073-implement.md("The fulltests/suite has 6694 passes...") and earlier ACK after coder's mypy fix without re-runningmake lint-yaml Makefile::test-all:$(PYTEST) tests/ gateway/tests/ orchestrator/tests/ shared/tests/ -v -m "not functional"pyproject.toml::testpaths: lists all four roots- BRC re-review mechanism (verified working):
CONSENSUS_RE_REVIEWtoreviewer_concurrencyat 01:20:17 - Per-repo
checks:schema:config/repositories.yaml.example:202-204(- name: lint / command: make lint,- name: test / command: make test) - Existing loader:
config/repo_config.py::get_repo_checks(repo)already returns the validated list
Out of scope
- BRC re-review-on-push semantics (already correct per BRC deadlock: reviewer confirms before processing producer re-proposal after NACK #1576)
- The grimp selector's behavior on registration-site diffs (Make
make testchangeset-aware via grimp + sidecar LKG #2042 follow-up question) - Coverage gaps in
make test-allitself (separate question) - What to do when a repo has no
checks:block configured (probably: tester is unable to confirm; plan-phase should warn earlier — separate question)
References
- BRC deadlock: reviewer confirms before processing producer re-proposal after NACK #1576 — fixed reviewer-confirms-before-re-propose deadlock
- Make
make testchangeset-aware via grimp + sidecar LKG #2042 — mademake testchangeset-aware via grimp; relevant for the selector-escalation interaction - Fix #2087: fail loudly when sandbox build_commands silently break #2090 — fail-loudly on silent build failures (the pattern this ticket extends to test/lint attestation)
shared/egg_contracts/agent_roles.py::TESTER_ROLE— current contract (silent on test/lint command/scope)shared/egg_contracts/agent_roles.py::REVIEWER_CONTRACT_ROLE— current contract (silent on independent test re-run)config/repo_config.py::get_repo_checks(repo)— already loads the per-repochecks:block; ready to be the source-of-truth
Activity