Commit Graph

6212 Commits

Author SHA1 Message Date
YeonGyu-Kim cdac0d69bb fix(workspace): report only the active notepad change 2026-05-16 18:12:50 +09:00
YeonGyu-Kim 240a4a17ad fix(workspace): harden omo migration review issues 2026-05-16 18:02:54 +09:00
YeonGyu-Kim 82ec099c3a fix(atlas): match omo as a path segment 2026-05-16 17:52:28 +09:00
YeonGyu-Kim 63519ec563 docs(workspace): document omo workspace paths 2026-05-16 17:42:06 +09:00
YeonGyu-Kim f10f796318 fix(workspace): keep omo and legacy rules compatible 2026-05-16 17:41:49 +09:00
YeonGyu-Kim 36e373cdbb feat(workspace): point planning guardrails at omo 2026-05-16 17:41:35 +09:00
YeonGyu-Kim a86221b1a9 feat(workspace): store runtime state under omo 2026-05-16 17:40:11 +09:00
YeonGyu-Kim 5dca1a5742 feat(workspace): migrate legacy sisyphus state to omo 2026-05-16 17:39:54 +09:00
YeonGyu-Kim 76e573a920 Merge pull request #4073 from code-yeongyu/fix/team-create-permission-inline-spec
fix(team-mode): accept legacy inline team specs
2026-05-16 15:49:26 +09:00
YeonGyu-Kim d974cd3d3b test(hooks): repair stale retry harnesses 2026-05-16 15:43:15 +09:00
YeonGyu-Kim cf7bf9d02d fix(team-mode): accept legacy inline specs 2026-05-16 15:43:08 +09:00
YeonGyu-Kim a20540579e Merge pull request #4068 from code-yeongyu/feat/pre-publish-fix-v420
v4.2.0: pre-publish review fixes (BLOCKER-1..3, HIGH-5..10, MID-11/12)
2026-05-16 14:50:54 +09:00
YeonGyu-Kim 3f3a63c54d docs(changelog): v4.2.0 entry with known issues and supersession history
Documents the v4.2.0 release window in Keep-a-Changelog format, including prompt gate fixes, internal audits, known issues, and the watchdog supersession history.

Closes LOW-14, LOW-16
2026-05-16 02:13:58 +09:00
YeonGyu-Kim eba17441cf test(mock-module-audit): require lifecycle cleanup for mock.module
New AST-based audit walks all *.test.ts files under src/ and asserts every mock.module(...) call is paired with cleanup. Existing offenders are documented in MOCK_MODULE_LIFECYCLE_ALLOWLIST with TODO references.

Closes HIGH-10
2026-05-16 02:13:11 +09:00
YeonGyu-Kim aaa215c5de docs(release-process): add post-fix repro verification policy
Race-condition and concurrency fixes must include reporter-verified repro confirmation before the originating issue is closed. Adds the checklist and rationale grounded in recent incident examples.

Closes MEDIUM-12
2026-05-16 02:12:28 +09:00
YeonGyu-Kim 3435c9bef2 docs(adr): write prompt-async-gate ADR
Documents the reservation-based duplicate-injection guard introduced in v4.2.0 with accepted status, exported API signatures, release semantics, migration notes, and commit references.

Closes MEDIUM-11
2026-05-16 02:12:01 +09:00
YeonGyu-Kim 102d067022 fix(model-suggestion-retry): release reservation on async error path
The promptWithModelSuggestionRetry async variant did not release the
post-dispatch reservation when the wrapped promptAsync threw. Callers
that immediately retry (such as sendSyncPrompt error toast paths) hit
the gate as reserved and surfaced 'promptAsync skipped by gate: reserved'
instead of the underlying error.

Mirrors the existing sync variant fix from ff1b15d53.

Closes regression introduced by BLOCKER-2 hardening
2026-05-16 01:56:04 +09:00
YeonGyu-Kim 5a8bd05db0 test(prompt-async-gate): replace timer waits with deterministic sync (BLOCKER-3)
Lines 79/142/428 of prompt-async-gate.test.ts used timer-based synchronization, violating .sisyphus/rules/test-discipline.md which forbids time-based test waits. Replace them with explicit dispatch awaits and mocked-time expiry so the assertions do not depend on CI machine speeds.

Closes BLOCKER-3 (Wave 2 cleanup)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-16 01:50:11 +09:00
YeonGyu-Kim 9dd52a0435 docs(changelog): v4.2.0 entry covering BLOCKER + HIGH + KNOWN ISSUES
Closes L14

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-16 01:43:57 +09:00
YeonGyu-Kim 7dbb34cd4f refactor(background-agent): wire ParentWakeNotifier into BackgroundManager
Replace the inlined parent-wake coalescing logic in manager.ts with delegation to the ParentWakeNotifier extracted in c1ccf8d09. The four timer Maps and the related methods now live in their own module with a narrow public API, while BackgroundManager retains the wiring point and the enqueue-callback bridge.

Closes HIGH-9 (step 2: integration)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-16 01:43:16 +09:00
YeonGyu-Kim 41ff7bca24 fix(background-agent): release prompt gate before agent fallback retry
Release the model-suggestion prompt reservation before the spawner retries with the fallback agent so the immediate retry is not skipped by the gate.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-16 01:42:54 +09:00
YeonGyu-Kim 209063e861 docs(known-issues): document delegate-task early-failure-fallback deferral
PR #3825 introduced a delegated child-session bootstrap to capture first-prompt retry payloads before history is persisted, addressing the empty-history fallback gap. After merge the PR's own regression test failed on clean root bun test (6828 pass / 1 fail), so PR #4044 reverted it. Ship v4.2.0 with the bug documented and a workaround so users have an explicit story for the unfixed delegated child-session early-failure path. Reland will target v4.2.1.

Closes BLOCKER-4 (Path B - reland deferred to v4.2.1)
2026-05-16 01:40:57 +09:00
YeonGyu-Kim 0f8902c49b docs(changelog): v4.2.0 entry
Document all 7+ BLOCKER+HIGH fixes, breaking-change-free additions
(public exports), known issue for delegated child-session fallback
(PR #3825 deferred to v4.2.1), and internal-only changes.

Closes L14
2026-05-16 01:38:59 +09:00
YeonGyu-Kim 4848017219 test(mock-module-audit): require lifecycle cleanup for mock.module
Walk all test files, parse with TypeScript Compiler API, assert every
mock.module(path, factory) invocation has a paired afterEach/afterAll
cleanup. Existing offenders are allowlisted with TODOs for v4.2.1 work.

Closes H10
2026-05-16 01:37:28 +09:00
YeonGyu-Kim 845d862b9b test(prompt-async-gate): replace setTimeout sleeps with deterministic sync
Test-discipline.md forbids setTimeout(resolve, N) and sleep(N) in test bodies. Replace the 3 microtask and expiry sleeps with explicit microtask yields and deterministic clock advancement, preserving the prompt gate invariants without real-time waits.

Closes BLOCKER-3

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-16 01:36:57 +09:00
YeonGyu-Kim f8d6f2a2ec docs(known-issues): document delegate-task PR #3825 revert deferral
PR #3825 added a shared bootstrap context to capture delegated
child-session retry payloads before the first prompt dispatch, so
empty-history failures could still retry through the fallback chain.
The PR's own regression test failed on clean root bun test after merge
(6828 pass / 1 fail). PR #4044 reverted the merge to keep dev green.

Ship v4.2.0 with the bug documented and a workaround so users have an
explicit story for the unfixed delegated child-session early-failure
path. Reland targets v4.2.1 once the regression test is stabilized.

Closes BLOCKER-4 (Path B - documentation, reland deferred to v4.2.1)
2026-05-16 01:36:21 +09:00
YeonGyu-Kim c096a596eb test(mock-module-audit): require lifecycle cleanup for mock.module
Closes H10

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-16 01:35:10 +09:00
YeonGyu-Kim 8914dab414 docs(known-issues): reference delegate fallback tracking issue
Update the v4.2.0 known issue with the filed follow-up issue and exact PR #3825/#4044 commit details.

Refs #4059.
2026-05-16 01:34:38 +09:00
YeonGyu-Kim 1590085f7b docs(release-process): add post-fix repro verification policy
Race-condition and concurrency fixes must include reporter-verified repro
confirmation before the originating issue is closed. CI green is necessary
but not sufficient.

Closes M12
2026-05-16 01:31:17 +09:00
YeonGyu-Kim 0c27ecb17d docs(adr): write prompt-async-gate ADR
Documents the reservation-based duplicate-injection guard introduced in
v4.2.0. Covers context (Issue #4012 race window), decision (Symbol token,
post-dispatch hold, dispatch timeout, shared runner, prefix-tightened
release), consequences (caller-side release discipline, AST audit
strengthens enforcement), and references.

Closes M11
2026-05-16 01:29:56 +09:00
YeonGyu-Kim 38732b426e docs(known-issues): document delegate-task empty-history fallback (BLOCKER-4)
PR #3825's fac90d69f introduced a shared bootstrap context to fix delegated child-session fallback when the first prompt fails before any session history is persisted. PR #4044 reverted that fix because its own regression test failed on a clean root suite (6828 pass / 1 fail). The bug remains unaddressed in v4.2.0; reland is deferred.

This commit documents the symptom, history, workaround, and tracking issue so users have visibility.

Closes BLOCKER-4 via Path B (documentation).

Refs PR #3825, PR #4044, issue #4059.
2026-05-16 01:29:16 +09:00
YeonGyu-Kim 0941ffe7f3 docs(release-process): add post-fix repro verification policy
Closes M12

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-16 01:28:08 +09:00
YeonGyu-Kim ee6bc67c5b docs(adr): write prompt-async-gate ADR
Closes M11

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-16 01:26:40 +09:00
YeonGyu-Kim d706587e1e docs(known-issues): document delegate-task early-failure-fallback deferral
PR #3825 introduced a delegated child-session bootstrap to capture first-prompt retry payloads before history is persisted, addressing the empty-history fallback gap. After merge the PR's own regression test failed on clean root bun test (6828 pass / 1 fail), so PR #4044 reverted it. Ship v4.2.0 with the bug documented and a workaround so users have an explicit story for the unfixed delegated child-session early-failure path. Reland will target v4.2.1.

Closes BLOCKER-4 (Path B - reland deferred to v4.2.1)
2026-05-16 01:25:58 +09:00
YeonGyu-Kim ff1b15d533 fix(model-suggestion-retry): release reservation before retry attempt
After BLOCKER-2's post-dispatch hold landed (the gate now keeps the
reservation through the hold window regardless of whether the dispatch
threw), the synchronous retry path inside promptSyncWithModelSuggestionRetry
hit 'reserved' on its own second attempt because the first attempt's
post-dispatch hold was still active.

The first attempt's failure is ProviderModelNotFoundError, which is a
synchronous SDK rejection - the prompt never reached the server, so
there is no durable session state worth protecting from a duplicate
injection. Release the post-dispatch reservation hold explicitly before
the suggested-model retry so the second attempt can dispatch immediately.

Fixes test regression introduced by the gate hardening (BLOCKER-2 fix).
2026-05-16 00:53:15 +09:00
YeonGyu-Kim c1ccf8d096 refactor(background-agent): introduce ParentWakeNotifier module
Extracts the parent-wake coalescing logic (pending/dispatched wake maps,
timers, notification reply assembly) from manager.ts into a standalone
ParentWakeNotifier class. Takes dependency-injected client, directory,
and an enqueueNotificationForParent callback, so the manager can delegate
parent-wake state to a narrow API.

This commit only introduces the new module; wiring manager.ts to use it
is a follow-up commit so the refactor stays atomic (HIGH-9 step 1 of 2).

Closes HIGH-9 (step 1: extraction)
Refs HIGH-9 (step 2: manager.ts integration deferred until verification)

Co-authored-by: manager-extract (deep / gpt-5.3-codex high)
2026-05-16 00:49:50 +09:00
YeonGyu-Kim 8c4cc09de7 test(prompt-async-route-audit): migrate to TypeScript AST walker
Replaces the previous regex-based audit (6 line-prefix patterns) with a
TypeScript Compiler API AST walker that detects raw client.session.prompt
and client.session.promptAsync access in any access shape:
- direct call (existing): client.session.promptAsync(...)
- property access reference: const x = client.session.promptAsync
- bracket access: client['session']['promptAsync']
- optional chaining: client.session?.promptAsync
- type cast aliasing: (client.session as { promptAsync }).promptAsync
- destructuring: const { promptAsync } = client.session

RAW_PROMPT_ALLOWLIST captures two legitimate callers that route through
the gate but reference promptAsync as a property value:
- src/plugin/event.ts wires a client facade for team-idle-wake-hint
- src/hooks/session-recovery/recover-unavailable-tool.ts guards capability
before dispatching through promptAsyncAfterSessionIdle.

Each allowlist entry carries a justification string so future contributors
understand why the exception exists.

Closes HIGH-5

Co-authored-by: audit-ast (deep / gpt-5.3-codex high)
2026-05-16 00:49:50 +09:00
YeonGyu-Kim f93d7297c8 test(prompt-async-gate): cover dispatch timeout and post-dispatch error hold
Adds regression coverage for BLOCKER-1 (dispatch timeout releases
reservation for next caller after stalled upstream) and BLOCKER-2
(post-dispatch error preserves the post-dispatch hold so an immediate
second caller observes the reservation and is gated).

Both tests subscribe-first on the promptAsync call count and assert
status transitions without sleep-based synchronization. dispatchTimeoutMs
is the system under test, so passing it explicitly as 1ms in those tests
is the SUT, not a sleep-as-synchronization (per test-discipline.md).

Closes BLOCKER-3 (dispatch timeout + post-dispatch coverage)

Co-authored-by: gate-tests (deep / gpt-5.3-codex high)
2026-05-16 00:49:28 +09:00
YeonGyu-Kim b333a52800 fix(prompt-async-gate): add dispatch timeout, shared runner, harden prefix release
BLOCKER-1 (dispatch deadlock): wrap session.promptAsync / session.prompt in
withDispatchTimeout() that uses Promise.race with a default 30s timeout.
Stalled upstream responses no longer hold the reservation forever.

BLOCKER-2 (post-dispatch failure released too early): collapse the
holdReservationAfterDispatch flag into a dispatchAttempted state so the
post-dispatch hold runs in the finally block regardless of whether
promptAsync resolved or threw. AGENTS.md's documented race window where
promptAsync 'returns before durably accepted, later failures arrive as
session.error' is now covered.

HIGH-6 (sync/async protocol duplicated): extract dispatchAfterSessionIdle
internal runner. promptAsyncAfterSessionIdle and promptAfterSessionIdle
become thin wrappers passing client.session.promptAsync vs prompt as
the dispatch callback. Future reservation semantics fixes apply once.

HIGH-7 (releasePromptAsyncReservation prefix foot-gun, partial): tighten
reservationSourceMatches to require prefix strings to end in ':' so
release cannot accidentally free reservations whose source merely starts
with the same identifier characters. Symbol token verification is still
internal-only as the audit invariant prevents external callers from
bypassing the gate.

Closes BLOCKER-1, BLOCKER-2, HIGH-6
Refs HIGH-7 (prefix hardened; token-required release deferred to follow-up)

Co-authored-by: gate-correctness (deep / gpt-5.3-codex high)
2026-05-16 00:49:28 +09:00
YeonGyu-Kim a19c1bfc6f chore(release): bump version to 4.2.0
The next release adds public exports for the prompt-async-gate primitives
(promptAsyncAfterSessionIdle, promptAfterSessionIdle,
releasePromptAsyncReservation, DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS)
and introduces new safety semantics that affect 13+ internal hook callers.
Per semver, adding public exports mandates a MINOR bump from 4.1.x.
No public API removals or breaking signature changes, so this is NOT MAJOR.

Closes pre-publish-review version-bump consensus

Co-authored-by: api-surface (deep / gpt-5.3-codex high)
2026-05-16 00:49:03 +09:00
YeonGyu-Kim c067b0fc06 refactor(plugin-entry): move createPluginModule to testing module
createPluginModule and PluginModuleDeps were exposed at package entry as
a test seam. Their export creates accidental public TS API obligations
for internal manager/tool/hook constructor types. Move to
src/testing/create-plugin-module.ts so only tests reach them.

Closes HIGH-8

Co-authored-by: api-surface (deep / gpt-5.3-codex high)
2026-05-16 00:49:03 +09:00
YeonGyu-Kim 1723a8b74c Merge pull request #3500 from Disaster-Terminator/fix/tmux-defer-attach-until-focus 2026-05-16 00:36:07 +09:00
YeonGyu-Kim e63c5b9a22 fix(tmux): require explicit active isolated window 2026-05-16 00:26:44 +09:00
YeonGyu-Kim 1ff59f44ce test(tmux): align pane-state runner format 2026-05-16 00:22:52 +09:00
YeonGyu-Kim d02cca4422 test(tmux): align pane replace placeholder expectations 2026-05-16 00:18:33 +09:00
YeonGyu-Kim 54a7256a71 test(tmux): align placeholder command expectations 2026-05-16 00:14:06 +09:00
Disaster-Terminator 91f1cf5fbc fix(tmux): pin pane commands to /bin/sh 2026-05-16 00:08:51 +09:00
Disaster-Terminator 8c5ca73634 fix(tmux): sweep suffixed stale isolated sessions 2026-05-16 00:07:57 +09:00
Disaster-Terminator 0c8e546c57 fix(tmux): support manager-scoped isolated session names 2026-05-16 00:06:58 +09:00
Disaster-Terminator 4e3684eb2a fix(tmux): gate isolated pane activation on visible client focus 2026-05-16 00:05:02 +09:00