Skip to content

Coordinate shell and formatter processes with workspace source saves - #16

Closed
liorshk wants to merge 1 commit into
noam/v2-product-patchesfrom
codex/source-outline-write-barrier
Closed

liorshk wants to merge 1 commit into
noam/v2-product-patchesfrom
codex/source-outline-write-barrier

Conversation

@liorshk

@liorshk liorshk commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Outline annotation saves must not overwrite an agent edit that starts between source validation and replacement. It lets the platform coordinate shell and formatter subprocesses with its source-save writer guard, including formatters that bypass shell hooks.

  • Mark shell and formatter Command objects internally and preserve that marker through stdin and pipeline reconstruction.
  • At process spawn, wrap marked commands with the helper configured in the trusted OpenCode environment. Per-command environment overrides cannot bypass or redirect admission.
  • Keep submitted native filesystem mutations alive until their IO settles before cancellation can release the caller's scope or writer guard. Read operations remain interruptible.
  • Leave unmarked long-running services unchanged; preserve displayed commands, standard streams, extra descriptors, exit status, and cancellation.
  • The platform owns the Python supervisor, durable leases, native file-tool plugin, exclusive source saves, and sandbox restart recovery. This patch does not enable wrapping when the platform configuration is absent.

Validation: 201 tests passed, 10 platform-specific skips, and zero failures across environment, native-tool, process, cross-spawn, formatter, and session-shell suites. A real 1 MiB FIFO write regression failed before the cancellation fix and passes with it. Wrapper tests cover admission, environment override refusal, pipeline/stdin marker propagation, extra descriptors, cancellation, and unmarked services. Core/util typechecks and targeted formatting/lint checks passed. Platform Linux tests separately exercise detached descendants and crashed guards with the production supervisor.

Merge before the platform PR, which pins this commit and ships the helper and configuration together.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Hey! Your PR title Coordinate shell and formatter processes with workspace source saves doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@liorshk liorshk closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant