fix(land): check write access only in auto E and F

Closed
KJ
1mo ago
+673-4

Cloud#5944 limits auto repository write grants to E/F. The land example currently requires a push-capable credential at every stage, causing read-only A-adversarial to refuse before review.

Run the gh authentication and push-capability preflight only at E/F. Read-only A/B/C fix/D stages can proceed, while a denied E/F write grant still refuses before the GitHub gate or final push. This builds on merged flows#694's mode agreement guard. No runtime packages, model pins, or gates change; no npm release is needed.

Validation (Node v22.22.2):

PATH=/Users/khaliqgant/.nvm/versions/node/v22.22.2/bin:$PATH npm --prefix examples/land run typecheck
PATH=/Users/khaliqgant/.nvm/versions/node/v22.22.2/bin:$PATH npm --prefix examples/land test

Both exit 0, 91 passed, 0 failed. The new test drives A/B/C/D with denied push capability then refuses at E. Reverting only the E/F condition fails the same test at A; restoring the source byte-for-byte passes all 91. Literal commands/output and restored SHA: examples/land/evidence/staged-write-preflight/verification.md and sibling transcripts.

Hosted grant behavior remains unverified. Human merge and the land operator's source redeployment are required; this PR does not deploy.


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


Agent Relay sessions

  • codex session 01a19dbc · opened via gh pr create · last active 2026-11-03