Conversation
MageByte-Zero
left a comment
There was a problem hiding this comment.
The core defect is reproducible on the latest main, and the persisted-workflow inference is the right fix. I also cherry-picked this commit onto the latest main; the full suite passed (846 tests), along with build, artifact validation, and version checks.
One error-path regression should be fixed before merge:
Important — validate required positionals before reading persisted state
In scripts/guard/guard.mjs, resolveWorkflow(changeDir, values.workflow) runs before the changeDir / fromState / toState presence check. With this PR, running:
ssf runtime guard checkchanges from the existing usage error with exit code 2 to:
Guard error: The "path" argument must be of type string. Received undefined
with exit code 1, because readState(undefined) is reached first.
Please move the required positional validation before resolveWorkflow(), then add a regression assertion for the usage text and exit code 2. It would also be useful to keep both guard usage strings aligned by including [--workflow <mode>].
Once that small correction is made and the branch is updated from main, this PR has clear merge value.
|
The requested error-path correction is now implemented in follow-up commit 4a4ce7a:
Verification on Windows with Node
Full Windows
These existing environment/test portability failures are unchanged and kept outside this focused correction; I am not claiming a passing full suite for the new revision. @MageByte-Zero Please re-review the required-positionals correction and the new regressions. |
Reproduction
workflow accept <dir> --source direct-request --verification new-test, and confirm.spec-superflow.yamlpersistsworkflow: quick.runtime guard check <dir> exploring approved-for-build --jsonwithout--workflow; it is evaluated asfulland rejected. Passing--workflow quicksucceeds.Root cause
runGuard()registered--workflowwith a default offull, so absence of the option was indistinguishable from an explicit Full request and the persisted workflow was never consulted.Fix
--workflowas unspecified.fullas the fallback for missing or invalid persisted values.--workflow <mode>runtime-guard argument.Tests
infers a persisted Quick workflow when runtime guard omits --workflow.node --test --test-name-pattern="infers a persisted Quick workflow" tests/lib/cmd-workflow.test.mjspasses.node --test tests/lib/cmd-workflow.test.mjs tests/lib/guard.test.mjs tests/lib/cmd-runtime.test.mjspasses: 88 passed, 0 failed, 2 skipped.npm run buildpasses.npm teston Windows still has the pre-existing unrelated baseline failures inhooks/session-start,task-brief, andtoken-baseline: comparison.Conclusions for the two observations
cmd.exeinvocation with"pass: ..."round-trips correctly. A storedtest_result: "passmeans the host/shell serialization passed literal"passas argv, before the CLI received it; no code change is included for this observation.