Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
Codex independent read-only review: no findings at exact head Reviewed the source change and captured regression/typecheck/91-test evidence. E/F retain the write preflight; early review, fix and rebase stages use read-only grants without attempting a push probe. The source SHA matches the report; the final commit only adds the literal hash command and captured output. The reviewer did not independently rerun tests or hosted execution. |
[Medium impact] The PR appears safe to merge; no actionable issues were found.
|
There was a problem hiding this comment.
2 issues found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="examples/land/tests/flow.test.ts">
<violation number="1" location="examples/land/tests/flow.test.ts:762">
P2: This test does not verify the F preflight despite claiming coverage for E/F. Add a stage-specific mock that lets E complete but rejects the dry-run at F, then assert that F stops before the squash push.</violation>
</file>
<file name="examples/land/land.flow.ts">
<violation number="1" location="examples/land/land.flow.ts:924">
P2: The E/F preflight runs before `owned = state`, so a denied write grant returns a refused completion without persisting the existing run's `needs_human` terminal state. Assign the existing state to `owned` before this preflight, or otherwise save the terminal refusal, so the denial is recorded consistently.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
|
||
|
|
||
| test('hosted auto allows read-only A-D and proves write access only at E/F', async () => { | ||
| const w = world({ config: autoConfig, pushDryRunFails: true, |
There was a problem hiding this comment.
P2: This test does not verify the F preflight despite claiming coverage for E/F. Add a stage-specific mock that lets E complete but rejects the dry-run at F, then assert that F stops before the squash push.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At examples/land/tests/flow.test.ts, line 762:
<comment>This test does not verify the F preflight despite claiming coverage for E/F. Add a stage-specific mock that lets E complete but rejects the dry-run at F, then assert that F stops before the squash push.</comment>
<file context>
@@ -756,3 +756,27 @@ test('hosted mergeMode is optional locally and validates all supplied values', (
+
+
+test('hosted auto allows read-only A-D and proves write access only at E/F', async () => {
+ const w = world({ config: autoConfig, pushDryRunFails: true,
+ adversarial: [[blocker('probe/src/relay/agents.rs', 'fix')], []], roundFiles: [['probe/src/relay/agents.rs']] });
+ let stage = 'A-adversarial';
</file context>
| if (config.mergePolicy.mode === 'auto') { | ||
| // Preflight, not polling: the GitHub gate and the push need an authed gh | ||
| // and a write-capable git credential; prove both at stage one. | ||
| if (config.mergePolicy.mode === 'auto' && (input.stage === 'E' || input.stage === 'F')) { |
There was a problem hiding this comment.
P2: The E/F preflight runs before owned = state, so a denied write grant returns a refused completion without persisting the existing run's needs_human terminal state. Assign the existing state to owned before this preflight, or otherwise save the terminal refusal, so the denial is recorded consistently.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At examples/land/land.flow.ts, line 924:
<comment>The E/F preflight runs before `owned = state`, so a denied write grant returns a refused completion without persisting the existing run's `needs_human` terminal state. Assign the existing state to `owned` before this preflight, or otherwise save the terminal refusal, so the denial is recorded consistently.</comment>
<file context>
@@ -921,9 +921,9 @@ export async function land(f: Ctx, raw: LandInput): Promise<void> {
- if (config.mergePolicy.mode === 'auto') {
- // Preflight, not polling: the GitHub gate and the push need an authed gh
- // and a write-capable git credential; prove both at stage one.
+ if (config.mergePolicy.mode === 'auto' && (input.stage === 'E' || input.stage === 'F')) {
+ // Cloud grants A-D read-only access. Prove write capability only in
+ // E/F, where the GitHub gate and final push need the scoped write grant.
</file context>
|
Superseded by #695, which owns the stage-preflight change and now also the cancellation fence. The duplicate was opened before the relay handoff arrived. Closing this PR; retaining the branch and captured evidence. The only preflight difference is that #695 keeps |
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
ghauthentication 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):
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.mdand sibling transcripts.Hosted grant behavior remains unverified. Human merge and the land operator's source redeployment are required; this PR does not deploy.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Agent Relay sessions
codexsession01a19dbc· opened viagh pr create· last active 2026-11-03