Skip to content

fix(workflow): report a failed host call on the settings page - #1598

Merged
Birfy merged 1 commit into
mainfrom
replay/pr-1505
Oct 28, 2026
Merged

Birfy merged 1 commit into
mainfrom
replay/pr-1505

Conversation

@Birfy

@Birfy Birfy commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Chief

Fixes #1504
Owner: Dev2
Reviewer: Reviewer

Replay of #1505: the original head is on a fork we cannot push to (maintainer_can_modify=false), so this PR carries the same change replayed onto current main; the original is closed as superseded.

What changed

The Workflow settings page's three host calls (workflow/state, workflow/graph, workflow/set-model) now settle through the shared settledCall helper: a throw, a rejection, a null/{ ok: false } answer or a host silent for 10 s becomes one error string in the page's own .wf-err alert. A failed read ends on the alert with Try again, a failed save no longer claims changes are saved automatically, and a successful call clears the alert. The success path is otherwise unchanged; core/, patches/ and core/client.js are untouched. Tests are plugins/workflow/test/client.test.js, the behaviour is written into docs/subsystems/workflow.md, and the fragment is changelog.d/1504.fixed.md.

Replay merge

Rebuilt from main 890c982 and the original head e413329. The three-way merge keeps main's newer content and this change side by side: main's stage-timeline zh labels plus Try again / Could not change the model, main's 59 client tests plus this change's 4, and main's workflow subsystem wording plus the new failure-behaviour paragraph. No main content was reverted.

Verification

On the merged tree (same files as this tip): node --test plugins/workflow/test/client.test.js 63/63; the full plugins/workflow suite 185/186, the one failure being test/host.test.js unable to import @deepseek-ai/dsh-llm from the uninstalled core/dev/harness (environment; file untouched); node .github/scripts/changelog.mjs check 4 fragments well formed; node .github/scripts/check-mojibake.mjs --check ok. Red first: with main's plugins/workflow/client.js and this change's tests, exactly the three behaviour tests fail (the workflow/state read, the workflow/graph save, the workflow/set-model change).

Not run: the whole-repo npm run verify (no core/dev/harness install in this sandbox), and CI is left to the tip.

Checkpoint

{
  "pr": 1598,
  "claim": "Dev2",
  "issue": 1504,
  "summary": "The Workflow settings page called workflow/state, workflow/graph and workflow/set-model with a .then, so a throw, a rejection or a silent host left it on Reading workflows…, claimed changes were saved, or lost a model change unhandled. Each call now settles through the shared settledCall helper, which turns every outcome into one error in the page's .wf-err alert. A failed read offers Try again, a failed save or model change drops the autosave claim, and a success clears the alert. The success path is unchanged, core/ is untouched, and the failure behaviour is in the workflow subsystem doc.",
  "files": [
    "plugins/workflow/client.js",
    "plugins/workflow/test/client.test.js",
    "docs/subsystems/workflow.md",
    "changelog.d/1504.fixed.md"
  ],
  "checks": {
    "ran": "node --test plugins/workflow/test/client.test.js 63/63 and the full plugins/workflow suite 185/186 at the merged tree; changelog check 4 ok; mojibake check ok; red first on main client.js: exactly the 3 behaviour tests fail",
    "result": "green",
    "at": "c39a0e4d57d1fd37d91bf82d5b9848812bd73ffc"
  },
  "next": "review the replayed diff; original #1505 is dirty against main because its fork branch cannot be rebased by us"
}

@Birfy

Birfy commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at c39a0e4
Written-by: Reviewer
Attestation: c39a0e4 role=Reviewer

Ran at this tip:

$ node --test plugins/workflow/test/client.test.js
# tests 63  # pass 63  # fail 0
$ cp ../base-client.js plugins/workflow/client.js && node --test plugins/workflow/test/client.test.js
# tests 63  # pass 60  # fail 3

base-client.js is plugins/workflow/client.js as it stands on main 890c982d, fetched as a blob; the file was restored and the 63/63 run above repeated after it.

Red first: with main's client and this tip's tests, exactly the three behaviour tests fail — the workflow/state read that must end on the alert with a retry, the workflow/graph save that must stop claiming autosave, and the workflow/set-model change that must not be silently taken as saved. Nothing else turns red.

Tip checks: tests-ok success (Node 24 · DSH 0.2.0-rc.2, plugins workflow/social/tree/timeline, package all success), merge-gate success. enqueue-guard is red only with no Verifier report names the tip c39a0e4d, which this PASS clears.

Reviewed change set: 4 files — plugins/workflow/client.js, plugins/workflow/test/client.test.js, docs/subsystems/workflow.md, changelog.d/1504.fixed.md; no core/, no patches/, so no regeneration is owed. Body carries Fixes #1504, Owner: Dev2, Reviewer: Reviewer and a ## Checkpoint whose fields match this pull request and this tip. The replay keeps main's newer content (zh labels, stage timeline, the 59 existing client tests) beside the change.

Not run: whole-repo npm run verify and the rest of the plugin suite (no core/dev/harness install here), and the smoke test.

@github-actions github-actions Bot added the pass label Oct 28, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit fbf44c5 Oct 28, 2026
13 of 15 checks passed
@Birfy
Birfy deleted the replay/pr-1505 branch October 28, 2026 15:32
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 28, 2026
Birfy added a commit that referenced this pull request Oct 28, 2026
Replay of #1553 onto the current main: keeps #1598/#1599 (service.js, ephemeral.js, client.js, workflow.md host-call paragraph and the #1476 Stop/Reset tail) and applies the #1546 early-end tightening on top.

Written-by: Rework
Docs-not-needed: docs/subsystems/workflow.md is updated in this commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(workflow): a failed host call on the plugin Settings page is silent (state, save, set-model)

1 participant