Skip to content

fix(setup): make episode closure observable - #209

Merged
somewan820 merged 4 commits into
mainfrom
codex/issue-153-setup-episode-closure
Aug 28, 2026
Merged

somewan820 merged 4 commits into
mainfrom
codex/issue-153-setup-episode-closure

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make no-op /openpi-setup completion observable with a durable, model-visible closure receipt and explicit re-entry guidance
  • activate the owned typed writer before Pi freezes the provider tool snapshot, while keeping busy setup requests private until the prior run settles
  • fail closed on missing or mismatched writer provenance and serialize writer admission, including duplicate and same-ID parallel calls
  • add real Pi provider-context coverage for first-run visibility, later hiding/closure context, successful apply, and parallel-call persistence

Compatibility impact

  • User-visible: no-op setup runs now append an explicit closure receipt; busy setup requests start in a fresh run after the current run settles
  • Model-visible: setup prompts state the one-run writer boundary and later contexts retain the closure/re-entry contract
  • Runtime: setup-active is published only after provenance-attested activation; one writer call is admitted at a time
  • Persisted config/schema: unchanged

Validation

  • bun test tests/extensions/setup/index.test.ts tests/extensions/setup/integration.test.ts tests/extensions/shared/tool-surface.test.ts (33 passed)
  • bun run check (passes; existing Effect diagnostics remain warnings)
  • bun run test (910 Node tests + 30 Vitest tests passed)
  • git diff --check
  • three independent review rounds across design, adversarial lifecycle/race analysis, and test evidence; final round: no findings

Closes #153

@somewan820
somewan820 self-requested a review August 28, 2026 03:09

@somewan820 somewan820 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Restore the complete no-op closure receipt

extensions/setup/index.ts:165-166 now returns only:

"The configuration writer is now hidden. To make a configuration change, run /openpi-setup ."

For a setup run that settles without a successful writer call, the persisted/model-visible closure receipt must also state that no configuration update was confirmed and that
configuration files must not be edited directly. Those facts were present in the first commit but were removed by the follow-up simplification.

Without them, a later model context, especially after compaction, cannot distinguish "no update was confirmed" from "the update completed but the writer was hidden", and the
direct-edit safety invariant is no longer carried by the durable closure receipt. This also no longer satisfies issue #153's stated acceptance criteria.

Please restore the explicit no-op and direct-edit prohibition text, and keep corresponding assertions in tests/extensions/setup/index.test.ts and the integration test.

@somewan820
somewan820 self-requested a review August 28, 2026 07:24
@somewan820
somewan820 merged commit fcbc5e5 into main Aug 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup: no-op episode 静默隐藏 writer,后续自然配置请求面对不可用工具

2 participants