Skip to content

fix(workflow): refuse callback-erased legacy loop publications - #4862

Merged
kwakayama merged 1 commit into
mainfrom
fix/2472-loop-publication-provenance
Oct 3, 2026
Merged

kwakayama merged 1 commit into
mainfrom
fix/2472-loop-publication-provenance

Conversation

@kwakayama

@kwakayama kwakayama commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Refs veryfront/veryfront-issue-inbox#2472

A loop completion callback can erase every result metadata key, so JSON-persisted output no longer satisfies the old two-key heuristic. Refuse ambiguous object publications without input/step/wait provenance; recover parallel and branch publications only when retained child states corroborate them. Context snapshots continue to preserve exact publications.

Expanded durable regression matrix covers both callbacks, all two-key combinations, all-three erasure, completely empty output, and removed/step/parallel replacement (including raw empty parallel). Corrected the prior single-key parallel fixture to agree with its retained integer child result; historical wait fixtures retain genuine wait identity. Documented the fail-closed compatibility rule.

Validation: red on origin/main (24 erasure cases failed); green affected DAG file (402 steps); changed-file format/lint/typecheck and semantic-disposition audit pass. Testing-front-door audit passes with unrelated baseline improvements reported. Local full verify skipped under owner instruction to leave full suites to CI; required remote checks and exact-head review remain mandatory.

Filed bug: veryfront/veryfront-issue-inbox#2600 tracks empty-arm branch impersonation, outside #2472 removed/step/parallel replacement.

Follow-ups (not filed): none.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 06:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T07:23:04.937949Z 51f1607 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cec26600-9c2b-4290-a4d6-5264f9c11522
📥 Commits

Reviewing files that changed from the base of the PR and between f534945 and 51f1607.

📒 Files selected for processing (3)
  • docs/guides/workflows.md
  • src/workflow/executor/dag/index.test.ts
  • src/workflow/executor/dag/index.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@gitar-bot

gitar-bot Bot commented Oct 3, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

Copy link
Copy Markdown
Contributor Author

Score: 80/100. Replaces the fragile two-key loop-output heuristic with a fail-closed provenance rule, and the regression matrix is thorough.

  • Strength: Closes a real hole. A loop callback that erases every metadata key is invisible to the old heuristic, so mayHoldLoopPublication now keys on missing input, step-input, sub-workflow-input and _waitInstanceId provenance instead. That is simpler and cannot be defeated by erasure.
  • Strength: Test coverage is strong. It covers both onComplete and onMaxIterations, every metadata key combination, the all-erased case, and removed/step/parallel/empty-parallel drift. The PR says 24 cases failed on main. The two fixture corrections (integer child result, explicit wait identity) are justified and match the new rule.
  • Strength: Generalizing parallel-only corroboration to branch is consistent. Empty parallel is refused, since there is no evidence to separate it from erasure. The docs describe the compatibility rule.
  • Concern: The rule is deliberately broad. Any legacy object output with no provenance and no corroborating retained children is now refused on retry or resume, so some previously restorable legacy runs will fail with the legacy compatibility error. That fits the stated fail-closed stance, but the PR should state the intended blast radius, and add one positive test showing an unrelated legacy object publication that stays restorable if one is meant to.
  • Concern: The empty-branch corroboration ({ branch, skipped: true }) is accepted without any retained-state evidence. A loop callback that returns exactly that shape would pass. This is unlikely, but it is inconsistent with the empty-parallel refusal. Either justify it in the comment or add a negative test.
  • Process: The full local verify was skipped. Make sure the required CI checks pass on this exact head before queueing. Also, the docs sentence wraps unevenly mid-paragraph (minor).

No blocking issues found. Approval is conditional on green CI.


Generated by Claude Code

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

📦 Client bundle boundary

Entrypoint Modules Source size Server leaks
src/index.client.ts 293 2337 KiB ✅ 0

A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in scripts/lint/client-bundle-baseline.json to burn down.

@kwakayama

Copy link
Copy Markdown
Contributor Author

Independent review of exact head 51f1607: correctness + spec + quality, 95/100, no blocking findings. Reviewed durable erasure matrix for both callbacks, all two-key/all-key combinations, empty object, definition drift, and side-effect counts; input/step/wait provenance and retained composite corroboration preserve genuine recovery. Tests inspected; author ran the affected DAG file (402 steps PASS), changed-file lint/format/typecheck. No score threshold is used as a merge gate.

@kwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51f1607f68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/workflow/executor/dag/index.ts
@kwakayama

Copy link
Copy Markdown
Contributor Author

Review disposition: the fail-closed compatibility scope is intentional for historical object rows with no input/step/wait provenance and no corroborated composite tree. Existing positive regressions retain legitimate step output, integer/array parallel output, nested composite publication, and genuine wait identity. The empty-arm branch impersonation is a separate definition-drift BUG, filed as veryfront/veryfront-issue-inbox#2600; #2472 explicitly scopes removed/step/parallel replacement. No remaining blocking finding; exact-head required CI remains the merge gate.

@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/workflow/executor/dag/index.ts 87.50% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@sonarqubecloud

sonarqubecloud Bot commented Oct 3, 2026

Copy link
Copy Markdown

@kwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

Re-review exact head 51f1607 after the prior P2 disposition: the empty-arm branch replacement bug is filed as veryfront/veryfront-issue-inbox#2600, linked in the reply, and its review thread is resolved. This PR satisfies #2472 removed/step/parallel drift; source tests, format, lint, typecheck, integration, binary tests, and Sonar are now green. Independent exact-head review found no blocking finding.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 51f1607f68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kwakayama
kwakayama added this pull request to the merge queue Oct 3, 2026
Merged via the queue into main with commit a7fe9e4 Oct 3, 2026
102 of 103 checks passed
@kwakayama
kwakayama deleted the fix/2472-loop-publication-provenance branch October 3, 2026 08:00
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.

2 participants