Skip to content

fix(planning): resumePlan surfaces step-mode HITL fields#246

Merged
saurabhjain1592 merged 2 commits into
chore/spec-pin-v961from
fix/resume-plan-step-fields
Jul 10, 2026
Merged

fix(planning): resumePlan surfaces step-mode HITL fields#246
saurabhjain1592 merged 2 commits into
chore/spec-pin-v961from
fix/resume-plan-step-fields

Conversation

@saurabhjain1592

Copy link
Copy Markdown
Member

Stacked on #245; when #245 merges this auto-retargets to main.

What

resumePlan dropped every field the platform emits on the step/confirm-mode resume path, and ResumePlanResponse documented them as deprecated/never-populated. That doc is wrong against today's platform: the orchestrator's resume handler (platform/orchestrator/run.go, resumePlanHandler) emits step_result/next_step/next_step_name/total_steps when it gates the next step (status: awaiting_approval), plus workflow_id on every path and message on terminal paths — and the v9.6.1 community OpenAPI spec declares all of them on ResumePlanResponse. Go/Python/Java SDKs already model them.

Refs getaxonflow/axonflow-enterprise#2861.

Changes

  • src/client.ts — resumePlan transformer now maps workflowId, stepResult, nextStep, nextStepName, totalSteps (existing planId/status/result/approved/message mappings preserved).
  • src/types/planning.ts — un-deprecated workflowId/message/stepResult/nextStep/nextStepName/totalSteps with accurate docs: step-mode HITL fields populated when the platform gates the next step, absent on terminal resumes. message verified against the wire before touching: it is a real wire field (terminal-path outcome summary, e.g. "All steps completed" / "Step rejected, plan aborted"), not a workflowId alias — the old deprecation text was wrong, so it is un-deprecated too.
  • tests/wcp-approval-webhook-rollback.test.ts — new resumePlan unit tests (none existed): step-gating wire payload (all fields land), terminal completed path (message present, step-gating fields undefined), rejected path (approved: false on the request wire), error path.
  • tests/fixtures/wire-shape-baseline.json — regenerated with scripts/wire-shape/refresh.js against the same pin (community ac1b7cd8…, openapi_specs_sha unchanged from chore(contract): bump OpenAPI spec pin to community v9.6.1 #245). The ResumePlanResponse drift entry and its burn-down note drop, exactly as chore(contract): bump OpenAPI spec pin to community v9.6.1 #245's note said they should. Acknowledged _note keys on DecideResponse/MCPCheckOutputResponse re-added after regeneration (refresh.js strips _note keys, per the note's own instruction).
  • CHANGELOG.md### Fixed bullet under the existing un-cut [8.5.1] section; version stays 8.5.1.

Verification

  • npm ci && npm run build && npm test green locally (32 suites, 971 passed / 13 pre-existing skips).
  • scripts/wire-shape/validate.js green against the pinned spec dir.
  • npm run lint clean.

Saurabh Jain added 2 commits July 10, 2026 02:03
The orchestrator's confirm/step-mode resume path emits step_result,
next_step, next_step_name, total_steps and workflow_id (plus message on
terminal paths), and the v9.6.1 community OpenAPI spec declares all of
them on ResumePlanResponse. The TypeScript resumePlan transformer
dropped every one of them, and the ResumePlanResponse type doc wrongly
marked the camelCase slots as deprecated/never-populated.

- src/client.ts: map workflow_id, step_result, next_step,
  next_step_name and total_steps onto the result (existing mappings
  preserved).
- src/types/planning.ts: un-deprecate workflowId, message, stepResult,
  nextStep, nextStepName and totalSteps with accurate wire-path docs
  (step-mode HITL vs terminal resume). message is a real wire field
  (terminal-path outcome summary), not a workflowId alias.
- tests: new resumePlan unit tests covering the step-gating payload,
  the terminal completed path, the rejected path, and the error path.
- wire-shape baseline regenerated against the same pin (community
  ac1b7cd8, unchanged): the ResumePlanResponse drift entry and its
  note drop; acknowledged _note keys on DecideResponse and
  MCPCheckOutputResponse re-added (refresh.js strips them).
- CHANGELOG: Fixed bullet under the un-cut 8.5.1 section; version
  unchanged.

Refs getaxonflow/axonflow-enterprise#2861

Signed-off-by: Saurabh Jain <dev@getaxonflow.com>
Adds runtime-e2e/resume_plan_step_fields/: generatePlan(executionMode:
'confirm') → executePlan (WCP gates step 0) → resumePlan per gated step
→ terminal resume, against a real Enterprise agent. Asserts every
non-terminal resume carries workflow_id/step_result/next_step/
next_step_name/total_steps and the terminal resume carries
workflow_id + message with no step-gating fields.

Verified green against the live local Enterprise stack (RESULT: PASS,
12/12 checks).

Refs getaxonflow/axonflow-enterprise#2861

Signed-off-by: Saurabh Jain <dev@getaxonflow.com>
@saurabhjain1592 saurabhjain1592 merged commit 1a659bc into chore/spec-pin-v961 Jul 10, 2026
3 checks passed
@saurabhjain1592 saurabhjain1592 deleted the fix/resume-plan-step-fields branch July 10, 2026 00:13
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