Skip to content

Support explicit Flow run abandonment - #211

Merged
bigboateng merged 4 commits into
mainfrom
feat/flow-run-supersession
Aug 13, 2026
Merged

Support explicit Flow run abandonment#211
bigboateng merged 4 commits into
mainfrom
feat/flow-run-supersession

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

Summary

  • preserve a bound Flow run when the plan inbox changes
  • expose explicit software-delivery abandonment as a repository-declared entry
  • reset product state before binding a replacement delivery
  • generate matching Codex and Claude skill guidance

Verification

  • go test ./...
  • npm run test:flow-sdk
  • local isolated runtime pilot with inbox replacement, abandonment, restart, and replacement binding
  • local Boatstack review: READY

@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codex automated review

Verdict: patch is incorrect
Confidence: 0.98

The patch introduces a deterministic resolver/apply loop, a cross-worktree Flow-identity lookup, and an unreachable valid abandonment entry. Model-level verification is recommended before merge. Questions: can every terminal workspace state reach the new bind prerequisite, and can the new abandonment selection priority enter any additional zero-progress cycle?

Comment thread boatstack/internal/softwaredelivery/effects/state_reducer.go Outdated
Comment thread boatstack/internal/softwaredelivery/effects/receipts.go
Comment thread boatstack/cmd/boatstack-helper/flow_runtime.go Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codex automated review

Verdict: patch is incorrect
Confidence: 0.99

The patch introduces a resolver/apply disagreement and breaks terminal replay for the new synthetic abandonment run identity. Model-level verification is recommended before merge: verify that every newly selectable abandonment path either reaches its marked state or retains a replayable recovery path.

Comment on lines +354 to +355
if state.Terminal != model.TerminalEstablished {
return fmt.Errorf("a different delivery requires the prior delivery to be terminal")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Reject active delivery replacement during resolution

Invariant: a prescribed transition must be accepted by apply for the identical state and context. With active nonterminal delivery A, request objective B for delivery B; the supervisor still prescribes objective.bind, but this new reducer check deterministically rejects it. State remains unchanged, so resolving again selects the same transition, producing a zero-progress loop through the standard CLI/RPC path. Add an engine-level test asserting that untargeted and targeted resolution refuse replacement before issuing a prescription unless A is terminal.

Confidence: 0.99

Comment on lines +166 to +167
func (s State) ActiveObjective() (model.Objective, bool) {
return s.Objective, s.Objective.ID != "" && s.Terminal == model.TerminalNonterminal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Preserve abandonment run identity after terminal commit

Invariant: a committed Flow transition must remain replayable under its original run identity after reaching its marked terminal. Abandonment uses a synthetic run ID derived from active-run:<original-run>, but after plan.abandon commits, ActiveObjective returns false. A retry after a lost response therefore resolves the plan normally and derives a different run ID from its file digest, failing with FLOW_RUN_MISMATCH before idempotency lookup or marked-state observation. The durable abandonment succeeds, but the client cannot recover its receipt through the Flow path. Add an end-to-end test that discards the first successful abandonment response and retries the exact request, expecting the committed receipt or marked result.

Confidence: 0.98

@bigboateng
bigboateng merged commit 1393ecd into main Aug 13, 2026
18 checks passed
@bigboateng
bigboateng deleted the feat/flow-run-supersession branch August 13, 2026 07:43
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.

1 participant