Report effective review authority and superseded Devin bridge drift - #988
Conversation
Rendered status now describes the posture this run is actually configured for, and setup drift names the superseded Devin transport instead of reporting it as ordinary drift. - Add review_authority, which reads the selected review lane declaration and the maintained role decision from role_eligibility and renders the effective posture. No new policy resolver: installation, lane labels, and provider identity confer nothing, and a lane that declares merge authority renders as informational when the role decision narrows it. - Resolve the Claude and Codex audit comment posture from the repository configuration this run uses instead of defaulting to merge authority. An explicit --merge-authority/--informational flag or env override still wins, an explicitly selected --code-mower-config is never replaced by the starter, and a checkout that configures no lanes keeps the maintained lane default. - Single-source the session reviewer wording through the same label helper. - Detect the legacy Devin issue-comment bridge and labeler during setup drift and report a bounded migration to the maintained devin_api_v3 Sessions API transport, naming only the observed files. Nothing is deleted or rewritten. - Add a concise posture-scoped doctor view behind --concise that leads with active failures and owner actions and counts the remaining warnings by group. JSON and the explicit --advanced and --campaign modes keep full detail. - Add opt-in Devin setup guidance to the orchestrator prompt pack using the supported transport-selection and readiness commands, with generated setup staged for review rather than applied. Recorded audit headers stay readable evidence without becoming a claim about the current posture. The Claude + Codex default and the quiet default for unselected optional providers are unchanged. Closes #955 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Acceptance review for e4c88c8Two P2 gaps remain against #955's bounded work order. These are broker acceptance checks, separate from the in-flight independent Code Mower Codex audit. Keep this PR draft; the same Claude builder will receive a consolidated fix round after the current review completes.
The broker's canonical tests use an isolated temporary directory outside Git checkouts, preserving the context-store contract. The earlier two builder-environment failures do not establish a source regression. No paid provider work is part of these checks. |
Codex audit (merge-authority lane)Head SHA: Codex Audit: BLOCKED Summary: Default authority discovery reads proposed PR configuration instead of active repository policy, so audit comments can report an authority change before it is approved. Findings:
Source locations normalized to repository-relative paths for public privacy; the original reviewer output is retained privately. |
Code Mower Claude fix round for #955 / #988The original Claude writer exited cleanly at Consolidated required fixes:
Broker validation of this head used canonical Python with a private temporary directory outside Git checkouts: 645 tests and 1,146 subtests passed; only the privacy scan failed. The earlier two context-store failures disappear with that correct test environment. The maintained runner intentionally gives the builder a temporary directory inside its checkout; tests that specifically require private stores outside Git must allocate a proper external test root or use an authorized external temporary directory for the test invocation. Preserve the context-store boundary, and do not call that behavior a product defect. Retain all original work-order acceptance and coordinated ownership. Update the PR description around the completed implementation and actual checks, remove claims based only on literal source searches, and report the new full head. Include focused regressions, documented-command/release-hygiene checks, package materialization for new modules, Ruff and privacy scan. No test may start paid providers; no hosted Devin work, owner credential setup, auto-merge changes or provider authority promotion is authorized. All source changes stay with the same Claude builder. |
|
Additional acceptance guards for the active Claude fix round:
These clarify the already outstanding exact-head findings; they do not expand source ownership or authorize a second writer. |
…r commands Implicit audit authority discovery now reads `code-mower.yml` at the trusted base ref instead of the PR-head checkout the wrappers hand it, so a PR that promotes or demotes its own review lane no longer changes the audit comment's authority header before the change is approved. Discovery follows the existing `context_audit.required_for_repo` contract: a base that does not track the file configures nothing and keeps the maintained lane default, and discovery that cannot run falls back to that default rather than to the proposed policy. An explicitly selected configuration still wins, and a directory that is not a Git checkout still reads its own file. Operator overrides are read against the computed configured decision instead of replacing it. A positive `--merge-authority` flag or environment value can no longer widen an informational lane, a denied role policy, an unavailable capability or an unqualified role, and it no longer skips an explicitly selected configuration that could not be read; the rendered reason stays the configured one and the ignored override is recorded. A negative override still narrows, and whichever source decided the rendered posture is still named. Devin readiness commands carry the configuration source, so a finding against the packaged starter renders the supported `--easy` selector instead of the installation-specific path the starter resolves to at runtime. `--easy` is an alias for the recommended profile, so it only stands in for that profile; every other posture keeps its pinned, shell-quoted path, and a repository configuration is never replaced by the starter to shorten a command. The prompt pack documents the same portable form and the boundary on it. The new privacy assertion builds its home prefix the way `scripts/privacy_scan.py` writes its own patterns, so the test no longer trips the scanner it asserts. Tests: new trusted-base (promotion, demotion, absent base config, unavailable discovery, explicit selection), non-widening override (informational lane, denied role policy, agreeing configuration, negative narrowing, missing explicit configuration) and portable-starter command cases (doctor, transport selection, custom lane guidance, readiness remediation, repository config preserved, non-recommended profile, paths and profiles containing spaces). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude fix round complete for #955 / #988PR: #988 1. Codex finding
|
Code Mower Claude maintenance: finish #955 acceptance and integrate mainPrevious writer exited cleanly at Two P2 acceptance checks still fail on this exact head, as anticipated in the prior guard comment:
Preserve the completed positive-override narrowing, trusted-base-vs-proposed-head distinction, bridge preview, concise/full/JSON doctor behavior, quiet unselected providers, campaign-intent behavior, and role/lease documentation. Keep the existing privacy scanner intact. Ensure tests that assert an unset audit environment explicitly control that environment, so ambient operator overrides do not invalidate an unrelated default-argument assertion. Use the maintained Original ownership still applies: #963 owns admission/provenance/gate/controller/runner and init Run meaningful focused regressions, package materialization/inventory where affected, documented commands/release hygiene, Ruff and privacy scan. Remove stale PR claims that unavailable policy grants maintained defaults or that |
…selector Unknown trusted base policy no longer grants maintained defaults. Only a successful trusted-tree lookup that proves `code-mower.yml` is absent selects lane defaults; a missing or invalid base ref, a failed or timed-out Git command and malformed tracked configuration now report `trusted_base_unavailable`, which renders informational with a bounded action instead of starter merge authority. A positive operator override cannot widen it either. Rendered packaged-starter commands name a real supported selector. `--easy` is a first-run profile alias whose starter fallback depends on cwd-local files, and doctor and init fall back to different ones, so it could select a different configuration than the finding described. `code-mower doctor --packaged-starter` and `code-mower init --packaged-starter` select the maintained package resource directly, ignore cwd-local files, keep the caller's `--profile`, and reject a contradictory explicit positional config rather than ignoring it. Repository and custom config paths stay pinned and shell-quoted, and custom-lane guidance keeps its bounded manual form. Tests build real Git repositories for verified absence versus each unavailable case, and assert CLI-level selection against `code-mower.yml` and `code-mower.example.yml` decoys rather than comparing command strings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude fix round complete for #955 / #988PR: #988 0. Current main integratedMerged 1. Unknown trusted policy no longer grants default authority -- resolved
The specific reported case now behaves correctly: Codex in a Git checkout with a nonexistent Tests cover verified absence separately from each unavailable/malformed case: 2. Explicit portable package selector, not
|
Codex audit (merge-authority lane)Head SHA: Codex Audit: BLOCKED Summary: Audit authority can use a different base revision than the review, and migration verification checks the packaged starter instead of the installed configuration. Findings:
Source locations normalized to repository-relative paths for public privacy; the original reviewer output is retained privately. |
Code Mower Claude fix round: finish the two exact-head Codex P2 findingsContinue the same Claude-owned branch and draft PR #988. The prior runner exited 0 and Code Mower confirmed the writer finished and quiescent at Address both findings from the independently published exact-head Codex audit:
All 59 broker-run adoption regressions, Ruff and privacy scan passed on the prior head, and all CI package/containment jobs passed. The broker's full canonical suite is still running against that immutable prior head; do not change or interfere with its checkout. Use focused tests for your edits, the relevant audit/doctor/init/command/package/privacy regressions, and preserve all previously accepted behavior. The broker will run fresh final-head full checks and another exact-head Code Mower Codex audit after you finish. Update the PR description to describe the final implementation and actual validation concisely; omit abandoned approaches and long chronological fix history. Keep |
…d config Both audit wrappers resolved review authority before `audit_pr` fetched the base ref, so a stale local ref kept merge-authority wording through a repository demotion, and a base that was simply not fetched yet reported as unavailable -- while the review itself used the refreshed revision. `review_authority.AuthorityRequest` now carries the wrapper's product, explicit configuration selection and operator override instead of a resolved answer. Each wrapper validates an explicit `--code-mower-config` up front, so an operator typo still fails before any network work, and stays fail-closed informational until the posture resolves. Codex pins the base SHA immediately after its existing fetch and resolves against it; Claude records the revision `_build_diff_context` already fetched on `DiffContext.fetched_base_ref` and resolves against that, so the rendered header and the diff describe the same base. No second fetch and no second policy resolver. Configs without a request keep the authority they were given, so direct callers and recorded fixtures are unchanged. Devin transport-switch steps keep `--packaged-starter` for preview and staging, but the post-install check now selects the installed repository configuration at the same profile: an install never rewrites the packaged starter, so verifying through that selector re-reported the unchanged starter transport instead of confirming the switch. Repository-sourced findings install over their own file and keep their own path. Regressions drive both wrappers over real temporary Git repositories with offline provider fakes, advancing `origin/main` inside the fetch the way a real one would. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude fix round complete for #955 / #988PR: #988 Both exact-head Codex P2 findings are resolved. No new PR, no second writer, no 1.
|
Code Mower Claude continuation: carry the fetched snapshot through review and contextThe prior same-owner round exited 0 and Code Mower confirmed finished/quiescent at One part of the prior snapshot requirement is incomplete: Codex passes The orchestrator has explicitly required completion in #955, and the #963 owner confirmed the precise boundary: after the existing fetch, carry Add an offline regression that advances the named tracking ref after the fetch and proves both the rendered authority and downstream review/context stay on the fetched SHA. Cover both wrappers as applicable; keep direct-call/fixture compatibility, explicit configuration validation, fail-closed unavailable policy and non-widening overrides. Preserve the installed-config transport verification already fixed in the prior round. Run the new regression and relevant audit/adoption/command/privacy/package-hygiene checks. Do not spend the round repeating the long doctor/init/package/smoke sweep: the broker independently completed the earlier frozen Update the PR's final behavior and actual test evidence concisely, push the same branch, and re-request |
Resolving the audit posture against the fetched base was not enough on its own: base_ref stayed a mutable name, so the trusted-ref lookups, the review context and the review itself could resolve it again later and read a different commit than the one the audit fetched. Both wrappers now pin the fetched revision onto config.base_ref right after the existing fetch, so every downstream consumer -- decision authorities, context preparation, plan context, review diagnostics, the review doctrine load and the review's own --base and prompt -- describes one snapshot. Codex pins the SHA it already resolved after _fetch_base_ref; Claude pins the revision _build_diff_context already fetched. A ref that will not resolve keeps its name, so an unavailable base stays unavailable. No second fetch, no second policy resolver, no admission or provenance change. The force-push race path carries the fetched revision too, through a local FetchedHeadMismatch subclass, leaving the shared exception contract and every existing handler unchanged. Regressions advance origin/main after the fetch -- the way an upstream merge landing mid-review would -- and assert the rendered posture and the downstream review and context all stay on the fetched SHA, for both wrappers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude continuation complete for #955 / #988PR: #988 The incomplete part of the snapshot requirement is done: the fetched revision is What changed
A ref that will not resolve keeps its name, so an unavailable base stays Regression
All four fail on the parent commit Tests run on this head
Twelve failures on this runner are environment-only and were reproduced Per the continuation instruction I did not repeat the long doctor/init/package/ Remaining
|
Codex audit (merge-authority lane)Head SHA: Codex Audit: PASS Summary: No actionable regressions found relative to the merge base. Assessment based on code inspection; tests were not run. Findings: none. |
Closes #955
Adoption reports now describe the effective review authority and Devin transport for the selected configuration, with portable setup commands and a concise doctor view.
doctor --packaged-starterandinit --packaged-starterselect the maintained package resource consistently, preserve the profile, and reject contradictory positional config selection. Transport setup previews and stages from that resource, then verifies the installed repository configuration. Explicit paths and custom lane guidance remain pinned to their selected configuration.doctor --conciseemphasizes failures and owner actions while JSON, advanced and campaign views retain full detail. Unselected integrations remain quiet.Validation on
d52782405b18d7e280a1330748daccccb0e9a74b:Built by Claude through the maintained Code Mower local lane runner and independently reviewed through the Code Mower Codex audit wrapper. Raw execution evidence remains private. No hosted Devin session was created for this work.