Repository navigation
fix(exec): restore the repository checks after #2206 - #2240
Conversation
Two leftovers kept `xtask check` red on main: - The product still marked `execStop` as `internal(control)`, but #2206 removed that service; the catalog check reported that the entry names no catalog service. - `ShellSession.md` still described `B:Timeline`, `B:Dispatcher` and `S:SessionLifecycle` as dependencies and named a `dyn ExecStop` the part no longer provides. The page now lists the services the part injects and says `session.exec.stop` goes to the branch's `BackgroundExec`. Refs #2206 Refs #2032
zerob13
left a comment
There was a problem hiding this comment.
Approved. This removes the stale execStop catalog entry and updates the ShellSession documentation without changing the stop route: session.exec.stop still calls the target branch's BackgroundExec. The exact PR run passes the catalog and plugin documentation checks, the relevant stop tests, and the Linux, macOS, Windows, and ci-ok checks. This is independent of the usage-cache changes in #2239.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Verified at 626fb6a. cargo run -p xtask -- check exits 0: the static checks, the live catalog and the plugin documents pass (45 plugins). cargo fmt --all -- --check --config error_on_line_overflow=true exits 0. At 06f1402 the same check exits 1 with exactly execStop: internal(control) names no catalog service, after the static checks pass, so the stale entry is the only broken face. Nothing in the tree names execStop any more, and session.exec.stop resolves the branch's BackgroundExec (crates/dim-app-server/src/connection.rs:1631-1633), a branch data face (crates/dim-agent-capabilities/src/lib.rs:119,145), so removing the entry hides no live route.
The page matches the part: five injects (crates/dim-agent-capabilities/src/shell_session.rs:1178-1186), the foreground-timeout handoff (:989-1000) and the explicit job start (:1090-1101), and the stop path. The table edit is required for the check, not cosmetic: a row the part does not inject is an error (xtask/src/plugin_docs.rs:77-81), so the three removed rows would fail the plugin documents once the catalog was fixed.
Tests: this is a catalog deletion plus documentation; no behavior test applies. CI is green at this head: ci-ok, macos-native, windows-cli and verify (linux) pass; the path-filtered jobs are skipped.
P3 (optional), docs/architecture/rust-agent/plugins/ShellSession.md:12: the rewritten sentence still says the branch part owns the PTY. After #2206 HostPlatform owns and reads the PTY and records every command's and job's terminal (crates/dim-agent-capabilities/src/shell_session.rs:5-7, crates/dim-agent-capabilities/src/host_platform.rs:4044-4045, docs/architecture/rust-agent/plugins/HostPlatform.md:56-59, docs/design/service-faces.md:160, docs/design/resource-faces.md:122-125). Failure scenario: the next change to shell output or markers follows this page and puts the reader or the terminal write back in shell_session.rs, recreating the second terminal source #2206 removed. Fix: say the part owns the command queue and the foreground/background handoff, and that HostPlatform owns the PTY and serves the shell I/O; the P:HostPlatform row can then name that use.
P3 (optional), docs/architecture/rust-agent/plugins/ShellSession.md:24: B:TimelineIdentity still says it identifies the branch in "its facts and notices", but this part writes neither (crates/dim-agent-capabilities/src/shell_session.rs:5-9, docs/architecture/rust-agent/capability-event-inventory.md:37). It uses the identity for the branch output directory (crates/dim-agent-capabilities/src/shell_session.rs:1199-1203). Failure scenario: a later reader assumes this part produces exec facts and adds a producer subscription or a second writer. Fix: state the output-directory use.
Optional, docs/design/research/1295-host-platform-task-owner.md:331: the migration table still lists the superseded plan (the minimal ShellSession provides dyn ExecStop), while the same document's 7.3 (lines 341-346) says the route was replaced. It is a historical record, so not blocking; reword or mark the row historical if the file is touched.
Cross-PR: #2239 (head c6e3d52) carries the identical lib.rs deletion and a different rewrite of the same page. A three-way merge against 06f1402 puts the lib.rs change in cleanly for both (identical deletion) and conflicts on ShellSession.md in exactly three blocks: the intro sentence, the ShellSession paragraph and the B:BackgroundExec row. The B:Timeline, B:Dispatcher and S:SessionLifecycle deletions and the rest merge cleanly. #2227 (draft, head 548095f) deletes the same line and rewrites the same three blocks, with the same three conflicts. Whichever lands second must rebase and keep one page rewrite; if this PR lands first the other two drop their duplicate hunk, and if one of them lands first this PR drops its page rewrite. #2225 touches only the top of crates/dim-app-server/src/lib.rs, #2234 only the module list of crates/dim-agent-capabilities/src/lib.rs, and #2238 does not touch these files, so none conflict.
Earlier opinions: round 1 for this PR, none to withdraw.
| PTY, the command queue and the background jobs; `execute` resolves the calling | ||
| branch's service, and `session.exec.stop` asks the same branch's `ExecStop` | ||
| before falling back to `BackgroundExec`. | ||
| PTY and the command queue and hands its background tasks to `BackgroundExec`; |
There was a problem hiding this comment.
P3 (optional): the rewritten sentence still says this part owns the PTY. After #2206 HostPlatform owns and reads the PTY, parses the markers and records every command's and job's terminal (crates/dim-agent-capabilities/src/shell_session.rs:5-7, crates/dim-agent-capabilities/src/host_platform.rs:4044-4045, docs/architecture/rust-agent/plugins/HostPlatform.md:56-59, docs/design/service-faces.md:160). A reader who follows this page will put marker parsing or the terminal write back in shell_session.rs, recreating the second terminal source #2206 removed. Fix: say the part owns the command queue and the foreground/background handoff, and that HostPlatform owns the PTY and serves the shell I/O.
Fixes the two leftovers of #2206 that keep the repository checks red on main.
What changed
crates/dim-app-server/src/lib.rs: drop the("execStop", "control")internal-service entry. refactor(exec): one stop entry and one terminal source for shell tasks #2206 removed that service, soxtask checkreportedexecStop: internal(control) names no catalog service.docs/architecture/rust-agent/plugins/ShellSession.md: the page no longer listsB:Timeline,B:DispatcherandS:SessionLifecycle(the part does not inject them) and no longer says the part provides adyn ExecStopor thatsession.exec.stopasks it. It lists the services the part injects and says the stop goes to the branch'sBackgroundExec, matchingshell_session.rs.Verification
cargo run --locked -p xtask -- check— passes on this branch (it fails on06f14021ewithexecStop: internal(control) names no catalog service).cargo fmt --all -- --check— passes.Refs #2206
Refs #2032