Skip to content

Refresh trusted review publishers before readiness - #1751

Merged
mergify[bot] merged 4 commits into
mainfrom
lean178/1251-publisher-rotation-proof
Nov 26, 2026
Merged

mergify[bot] merged 4 commits into
mainfrom
lean178/1251-publisher-rotation-proof

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Refresh trusted review publishers before readiness

Acceptance

  • Refresh the configured trusted base before the initial readiness or merge observation.
  • Reuse the trusted configuration loader and review selector, preserve explicit configuration and fail closed when the configured origin is unavailable.
  • Verify that a retired publisher stays pending in both paths and that its replacement is accepted.

Notes

The offline publisher rotation test compares both paths with green source checks and a stale local tracking ref. The test diff adds 15 net lines.

Base

main @ c81807a

Validation

Recorded for 62d50970af69

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, 62d5097, approve

eowca and others added 4 commits November 26, 2026 09:56

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero primary review by claude on 62d50970af69dd0a91c833c88d5a0223f2ad65c8, 39.0s: approve (0 critical, 0 important, 2 suggestion)

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Native Claude output is retained in the restricted local review receipt.

Comment thread src/loopzero/config.py
cwd=worktree, env_allowlist=worktree_mod.GIT_ENV, timeout=60,
)
if fetched.exit_code != 0:
raise ConfigError(f"could not refresh origin/{branch}. {hint}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Fetch failure drops git's diagnostic

When the refresh fetch fails (authentication, network, a missing remote branch or a 60s timeout that returns a non-zero exit), the user only sees could not refresh origin/<branch>. Git's stderr is thrown away, and the hint ("Fetch the trusted base workflow") doesn't say why the fetch failed. base_revision in the same file already shows the last line of stderr with _proc.tail(done.stderr or done.stdout, 1). Smallest fix: add _proc.tail(fetched.stderr or fetched.stdout, 1) to the ConfigError message. The fail-closed behaviour stays the same.

Comment thread docs/ARCHITECTURE.md
its current successful check receipt; hosted eligibility evaluates GitHub
review evidence using trusted base configuration. Losing local artifacts may
require rerunning checks or review, and never creates a hosted approval.
review evidence using trusted base configuration. Local readiness and merge fetch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Docs say the base is fetched once, but there can be two fetches

load_trusted calls _remote_workflow(..., refresh=refresh) for origin's default branch. When that workflow's repo.base names a different branch, it calls it again for that branch. So ready/merge can fetch two branches, and the default branch it fetches isn't necessarily the configured base. Also, refs/remotes/origin/HEAD is not refreshed, so the branch chosen as the policy source can still come from stale local state. Either reword the doc (e.g. "fetch origin's default branch and the configured base branch at startup") or note that origin/HEAD is taken from local state.

@eowca
eowca marked this pull request as ready for review November 26, 2026 09:43
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as e757439 at 09:51 UTC

5 min in the queue, 4 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 09:46 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1782
  • ✅ Merged 09:51 · e757439 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit e757439 into main Nov 26, 2026
18 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1251-publisher-rotation-proof branch November 26, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review trust: Use the same base revision for local and hosted review publishers

1 participant