Repository navigation
Conversation
The PR description documents sufficient testing, including a representative build-first real-CLI round trip. No testing-record finding. I only read the diff; I did not run, build, or install PR code. |
|
No new findings in the specified diff.
I only read the diff and trusted base review criteria; I did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@nateEc Thanks. This branch conflicts with main in src/workflow/types.ts and src/__tests__/workflow-records.test.ts. Main caused it: #1234 (2401d047) added workflow_namespace_conflict and prompt_namespace_conflict to the WorkflowDiagnostic['code'] union and to the diagnostics list in the records test, on the same lines this PR extends. Keeping both sets of codes should resolve it. We'll review the rebased head. #1303, #1304 and #1306 also share most of their workflow files (types.ts, parse.ts, local-driver.ts, src/index.ts, the workflow guides), so whichever lands first will need the other two rebased again.
@nateEc an update to the request for changes: the conflict with |
- Add invocable workflow metadata, unambiguous aliases, bounded SessionStart discovery, a CLI-served workflow skill, and input-schema inspection without creating a run. - Resolve run ids across configured local scopes independently of cwd, reject duplicate ids, and bind configuration and workspace preparation to the run's retained original checkout. - Reuse local base-overlay, worktree, commit and push helpers through next --prepare and report; persist only preparation paths/fingerprints, retain edits on handback, and reject cancelled or mismatched reports before git delivery. - Keep graph scheduling in the engine and required approvals on the existing direct-person channel; update bilingual docs and generated help, with workflow/hook/skill tests, lint/typecheck/build and a real-CLI discovery-to-push round trip.
- Retain interactive and explicit read-only flags in durable preparation data, then apply the local driver's interactive write exemption during reporting. Explicit read-only sessions continue to reject repository edits. - Add prepared-session regressions for both interactive modes and extend the real CLI session round trip to preserve edits made in the active checkout. - Update skill-serving catalog and recall-gate expectations for the new workflow skill, fixing the failed fork-safe CI shard without weakening checks. - Verify all five session-driver tests, nine build-first real CLI/session/skill serving cases, typecheck and lint.
- 将会话驱动迁移到主分支共享 DriverSchema,保留发布与恢复的运行锁、命名空间诊断码及会话续接状态。 - 本机尚无运行文件时允许 next claim 和 resume 继续进入远程认领流程,避免本地发现逻辑提前拒绝它们。 - 新 next claim 回归在修复前失败、修复后通过;较大范围 1405 项 workflow 测试和最终命令文件 17 项通过。 - 6 个真实 CLI 会话、跨机器发布与恢复用例及构建、类型检查和 lint 通过;重新生成命令参考。
1c5c63a to
73b8835
Compare
|
Addressed the review follow-up at
The PR description contains the updated verification record. Ready for another review. |
I only read the specified diff and trusted base review criteria; I did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
@nateEc Thanks for this work. We are taking over #1303, #1304 and #1306 to speed up delivery. We will push the remaining changes to your branches, bring them up to date with main, and keep you as co-author in the squash commit. #1303 and #1306 go first, and #1304 follows once both have merged.
Please hold off on pushing to these branches in the meantime. All three stay blocked until we finish.
- 按工作区完成接口的失败标志处理会话报告,推送被拒绝时保留分支、提交和原始执行错误。 - 恢复跨检出目录 resume 的当前目录回退,确保缺失基础提交和合并提交仍执行远端校验。 - 新增成功与失败报告的拒绝推送回归;24 项相关单测、7 项 Git CLI E2E、构建、类型检查和 lint 通过。
|
Addressed the review follow-up at
The PR description contains the updated verification record. Ready for another review. |
SaulMoro
left a comment
There was a problem hiding this comment.
@nateEc Thanks for this work. We are taking over these three PRs to speed up delivery:
We will push the remaining changes to your branches, bring them up to date with main, and keep you as co-author in the squash commit. #1303 and #1306 go first, and #1304 follows once both have merged.
Please hold off on pushing to these branches in the meantime. All three stay blocked until we finish.
|
No new findings in the specified diff.
I only read the specified diff and trusted base review criteria; I did not run, build, or install PR code. |
|
#1180's benchmark PR (#1379) also uses On a benchmark run, This PR merges first. I'll rebase #1379 on it afterwards. |
Summary
An existing coding session can discover opted-in workflows, inspect required inputs, and drive the public lease loop with
--driver skill.next --prepareandreportreuse the local driver's base-overlay, worktree, commit/push and cleanup implementation, so the session never needs the graph or workspace git commands.Run-id operations resolve the owning local scope and original checkout independently of cwd, including from a workflow worktree or outside the product repo. Duplicate ids are rejected. Repeated preparation preserves edits, and cancelled, stale or mismatched reports are checked before git delivery.
Type of Change
Test Plan
npm run typechecknpm run lintnpx vitest run commands-reference -unpm run test:e2e -- workflow-session-1086(build runs first): one real-CLI round trip passed on this commit, with a disposable HOME and local bare remote. It checks SessionStart discovery, alias metadata/input inspection, skill-driver start, preparation from outside the repo, a repeated next and report from the worktree, rejection of an agent-mediated required approval, acceptance through the driver UI channel, a later report from outside the repo, base-config restoration, remote file contents, cleanup and served workflow skill content. Work itself is simulated by fixture edits, without a model account.Related Issues
Fixes #1086
The requirement-enforcement companion is #1303 (#1082). This branch targets current main independently and does not repeat that commit. The standard session profile declares no scoped-env/setup capability it cannot provide. The combined changes were also verified in an isolated integration checkout (details below).
Notes for Reviewers
Only the existing
teamaistub is deployed.skill-data/workflow/SKILL.mdis served by the installed CLI and points to current help instead of duplicating flags. Invocable context contains bounded metadata only, never the graph, prompt or command body. A full name wins over an alias; duplicate aliases do not resolve.--describecreates no run.The local preparation record contains workspace contracts, paths and fingerprints, including hashes rather than conflict contents. It contains no prompt or env values. A per-run driver lock serializes local execution and public preparation/report, while git/network work stays outside the run lock. Public report polls reconciliation before committing, verifies the active attempt/driver/revision, derives changes/read from git, and cleans up only after an accepted successful engine report. Direct-person approvals retain the existing
agent_in_pathrestriction.Run lookup scans configured data homes rather than adding a second run index. It reanchors self-mode configuration to the run's retained checkout so branch-authored configuration cannot choose the owning team merely because the caller is in that worktree. Session hosts remain responsible for truthful capabilities, actual tool/model/token metadata, stopping cancelled tools and applying an explicitly requested model; unsupported model selection is a reported
model_unavailablefailure.Integration with #1303: an isolated merge checkout passed typecheck, 25 focused limit/session/discovery/reference tests, both real-CLI safety/session E2Es, and a separate capability test showing that a valid secret-requiring step remains pending for a session declaring no env capability and can then be leased by a capable driver. Secret values remain absent from its lease. The test merge resolved the expected adjacent parser/type/help/doc additions; no dependency commits are duplicated in this PR.
Review follow-up (1c5c63a)
Addressed the interactive editing finding by retaining interactive/read-only flags in persisted preparation data and applying the existing local-driver exemption. Both writable interactive and explicit read-only cases are covered. Fixed the actual failed CI shard by updating every skill-serving/recall catalog expectation for the added workflow skill. All five session-driver regressions, typecheck, lint and nine build-first CLI session/skill-serving E2E cases passed at this head.
Follow-up verification (2026-10-25)
workflow nextwithclaim: trueandworkflow resume. A new next-claim regression failed before the compatibility fix and passes afterwards.Updated head:
9537a12f9ab64d314fb31335bbd7f7c454969c83. Rebased onto main6ebb31ce.