chore: merge develop preserving documentation structure and console UX
Integrate develop at 523bade3 while retaining concise agent guidance, rustdoc-owned design rationale, and current console history/rewind behavior. Adapt incoming tests to public entry-ID rewind and synchronize OpenAPI/TypeScript artifacts.
Validation: default-member cargo test --all-features (4936 passed, 23 ignored), root cargo check, all-feature rustdoc with broken links denied, format/diff/name guards, OpenAPI and 11 TypeScript freshness checks. Web: 613 unit, 327 component, 7 Ticket browser and 3 Console browser tests; check/build passed. Merged-state Ticket visual review at 1440/768/390px in light/dark; no matching pre-merge image baseline. E2E/live-provider checks not run.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
## 原因
|
||||
|
||||
`crates/workspace-server/src/frozen_repository_key_migration.rs:262–266`のcredential candidate移行は、旧credential ID/revisionから`repository_key_cutover`へLEFT JOINし、`m.fingerprint`を新しいNOT NULL列に挿入する。
|
||||
`crates/workspace-server/src/frozen_repository_key_migration.rs:262–266`のcredential candidate移行は、旧credential IDと保存counterの組から`repository_key_cutover`へLEFT JOINし、`m.fingerprint`を新しいNOT NULL列に挿入する。
|
||||
|
||||
JOIN条件の`m.created_at <= o.updated_at`が、RFC3339の鍵作成時刻とepoch-millis文字列のWorkdir更新時刻を、そのままTEXTとして比較している。日時としての順序を判定していないため、有効な古い鍵のJOINが外れ、fingerprintがNULLになる。
|
||||
|
||||
@@ -30,7 +30,7 @@ JOIN条件の`m.created_at <= o.updated_at`が、RFC3339の鍵作成時刻とepo
|
||||
| 項目 | 値 |
|
||||
| --- | --- |
|
||||
| operation | `call_mgmyCNofdQMZ8uyI5tg0mBhv` |
|
||||
| credential | `workspace-default`、旧revision 1 |
|
||||
| credential | `workspace-default`、旧保存counter 1 |
|
||||
| 鍵created_at | `2026-09-16T18:44:56.736Z` |
|
||||
| Workdir updated_at | `1790173821030` |
|
||||
| Workdir updated_atを日時に変換 | `2026-09-23T14:30:21.030Z` |
|
||||
@@ -42,7 +42,7 @@ JOIN条件の`m.created_at <= o.updated_at`が、RFC3339の鍵作成時刻とepo
|
||||
## 修正方針(この調査では未実装)
|
||||
|
||||
- frozen migration内で旧データの時刻形式を明示的に読み、同じ時刻型/epoch-millisへ正規化して比較する。文字列比較やSQLの安易なCASTに頼らない。
|
||||
- `created_at <= updated_at`の安全確認そのものは削除しない。旧ID/revisionが削除後に再利用された鍵を、過去のcandidateに誤って結び付けることを防ぐ条件である。
|
||||
- `created_at <= updated_at`の安全確認そのものは削除しない。旧IDと保存counterが削除後に再利用された鍵を、過去のcandidateに誤って結び付けることを防ぐ条件である。
|
||||
- candidateだけでなくoperation本体のcredential/host trust等、同じ境界の比較を確認する。
|
||||
- 正規化不能・不正な時刻や真に必要な証拠が欠落した場合は、NOT NULLエラーになる前に文脈付きで拒否し、transactionをrollbackする。
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# SubWorker cwd と複数 subtree 分担の障壁
|
||||
|
||||
T-739 実装時の観測。SubWorkerSpawn の説明では `cwd` は default tool cwd であり、Workdir root や capability を変えない。しかし次の child では、ファイルツールの attachment が cwd subtree を root として扱い、明示した sibling write scope を利用できないと報告された。
|
||||
|
||||
- `ticket-consumers`: cwd `crates/worker`。worker、client、yoi、manifest の対象ファイルに限定した write scope を委譲したが、通常 Read/Edit の logical path は worker 配下に限定された。committed session の報告 `E01a12680-0113-7552-a54b-f7fabc04506c`。
|
||||
- `ticket-api`: cwd `crates/server-api`。server-api、web、resources/prompts を明示的に委譲したが、Web/Prompt/生成出力は attachment 外として未変更。報告 `E01a1267f-7506-7a43-b61e-2cacbe092834`。
|
||||
|
||||
親は拒否された child に別経路で書かせず、境界内の部分結果だけを確認した。解放後、Client/CLI/Web は個別 cwd と明示 scope の別 child に分け、Prompt/生成同期は親が担当した。予想より細かい分担と再統合が必要になった。
|
||||
|
||||
改善案: Spawn の documented cwd 契約と file tool logical-root の解決を照合する。cwd が attachment を狭める仕様なら spawn 前に sibling scope を明示的に拒否し、実効 logical root と利用可能 subtree を返す。default cwd と logical root が別なら、その差を Read/Edit のエラーおよび初期 context に表示する。scope 拒否を回避する仕組みの要望ではなく、委譲時に有効な分担を予測できる診断の要望である。
|
||||
@@ -0,0 +1,23 @@
|
||||
# SubWorker実装中の契約接点の伝達
|
||||
|
||||
## 観測
|
||||
|
||||
T-741のdomain/store担当とserver認可/router担当を並行委任した。Worker管理の説明では実行中のWorkerへadvisoryを送る`WorkerNotify`が案内されていたが、親に提供されたtool inventoryは`WorkerList` / `WorkerSendInput` / `WorkerStop` / session observationで、`WorkerNotify`はなかった。
|
||||
|
||||
実装中に、認証済Runtime bindingをwrite transaction内でも照合する必要と、Assign/解除receiptにも同じsource-bound比較が必要という接点が判明した。Running childへの`WorkerSendInput`は使わず、session observationで子の実際の契約・diffを読み、子がIdleへ戻った自然な境界で追加依頼を送った。未完了の子を止めたり、入力の拒否を回避したりはしていない。
|
||||
|
||||
## 障壁と改善案
|
||||
|
||||
- 説明が存在しても実際のcapabilityがないため、同じ依存契約の追記をRunning中の担当へ早く伝えられない。双方がコンパイルエラーや作業木から接点を再発見する時間が増える。
|
||||
- capabilityがある場合だけ実行中advisoryの説明を提示するか、明示的な親→直接子のadvisory toolを公開する。通常SubmitやIdle-onlyの入力と混同しない。
|
||||
- 付与しない場合は、短い契約確定チェックポイントを分担の最初に設けることが現状の回避策になる。これは一般的な自動停止・polling・再起動の許可ではない。
|
||||
|
||||
本記録はこのSessionのtool提供面の観測であり、Backendの全環境に同機能がないと断定するものではない。
|
||||
|
||||
## Trusted Reviewer起動時の前提
|
||||
|
||||
同じSessionで、`builtin:reviewer`と明示MRのreview bindingを指定し、codeをread-only委任して起動を試みたところ、Backendから「writable delegated scopeが必要」、続いて「explicit command grantが必要」と引数検証で拒否された。Tool説明のread-only Reviewerという記述だけでは、この起動前提を予測できなかった。
|
||||
|
||||
最終的に、code全体のread scopeに加えて専用の空scratch `.review-t741` だけをwrite委任し、commandを明示grantして起動できた。source・Git metadataへのwriteを委任せず、Reviewerの調査・一時出力をscratchに限定した。拒否されたreview authorityを別経路で代替したものではなく、trusted review bindingはBackendが生成してMRに記録した。
|
||||
|
||||
必要なwrite/commandとcode read-onlyの両立例を、起動前のTool説明に示すと不要な引数試行を避けられる。また、Reviewerの最初の判定提出はseverity `medium`がHTTP 422で拒否され、許容値が`blocker/major/minor/note`と判明した。未記録をMR正本で確認し、新しいreview turnで適切なseverityによる独立判定を提出した。Role側の提出回数制約と引数validation failure後の返却・再開方法も、許容値とともに明示すると扱いやすい。
|
||||
@@ -0,0 +1,287 @@
|
||||
# T-748: async caller ownership inventory and scoped repair evidence
|
||||
|
||||
## Current status and evidence boundary
|
||||
|
||||
MR `01a12d3f-e90c-7b02-9ed9-cf3bd2e822a1` seq13 requested changes for published
|
||||
`ebce7ab7b1230654b8eb5340afca8de835f24f12`. The independent review confirmed the
|
||||
revoke cancellation/publication fix, but found three further direct async callers.
|
||||
Earlier full suites exercised successful outcomes without proving every composed
|
||||
caller boundary. Repeatedly treating a helper's apparent purpose as its lane
|
||||
classification missed Runtime lookup in Ticket projection and post-await reads.
|
||||
A successful suite is not a substitute for the entry-to-publication inventory.
|
||||
|
||||
The seq13 and adjacent fixes were committed as `5873f250`; embedded protocol
|
||||
and Feature shutdown fixes as `4d981194`. The remaining confirmed caller-placement
|
||||
and Worker stop repairs are included in the follow-up below. The read-only audit
|
||||
children were released after result-observation gaps; that release was not treated
|
||||
as completion. No audit-to-implementation approval gate is imposed.
|
||||
No target integration, Ticket conclusion, live update or attachment cleanup is
|
||||
performed. T743 domain APIs are not copied or implemented here; their owner still
|
||||
needs normal composition and exact combined-source review.
|
||||
|
||||
The tables and line numbers below preserve the **pre-repair audit snapshot**.
|
||||
“Unfixed”, “pending”, and “remaining” in those historical sections describe that
|
||||
snapshot, not the current implementation. The final section supersedes their
|
||||
placement/stop status and explicitly distinguishes tested boundaries from limits.
|
||||
|
||||
Audited snapshot `server.rs` SHA-256:
|
||||
`dae05a2649f5d4f884e8118ba4ce6baa902de6e61727c20e97c0afa3661ef3a6`.
|
||||
Audited snapshot `worker_operations.rs` SHA-256:
|
||||
`e3ad2327370440fdc40fb2c76f9604b984667e3472570d76145f4d0987d343fd`.
|
||||
These file hashes identify the inspected implementation, not a provider review ref.
|
||||
|
||||
## Current confirmed ownership changes
|
||||
|
||||
| Entry / composed family | Authority and synchronous dependencies | Current owner / completion boundary | Evidence and limits |
|
||||
|---|---|---|---|
|
||||
| `ticket_implementation_cancel` → `scoped_cancel_ticket_implementation` | Ticket authority/assignment reads; Runtime cancel; current-session close; intact assignment cancellation transaction; detail | One accepted finite Host workflow owns cancellation through transaction and response. No Runtime wait on DB, no nested Host admission | Pre-authenticated generated POST route; real separate SQLite writer holds actual cancellation transaction; timer/control progress; cancelled waiter retains actual lease, then one operation/cleared assignment after drain. Saturated Host returns 503 without mutation. Existing live Coder cancellation policy passes |
|
||||
| `merge_request_selector_repair` → `scoped_repair_merge_request_selector` | Browser auth/explicit confirmation; MR store; current assignment; provider ref; intact repair/audit; public projection | Auth remains an owned DB read; confirmed post-auth mixed stage is one finite Host job | Browser auth is drained before real SQL/shared-mutex contention; post-auth stage stays Pending without blocking Tokio and retains cancelled Host lease. Imported NULL-selector/no-assignment fixture rejects without repair/thread effects. Host overload preserves confirmation priority. Successful provider repair is not claimed by this narrow fixture |
|
||||
| restore routes → `restore_runtime_worker_with_context` → `project_worker_restore_response_owned` | Existing authorized Host restore returns historical result; then whole stored Worker/links/Workdir/capability projection | Whole independent DB stage. A result with no Worker remains a pure response and needs no DB admission | Real SQL writer/shared-mutex hold; timer and independent Host control progress; bounded overload; cancellation retains actual DB lease; historical state preserved and no registry observation write. This tests post-restore policy, not a complete restore endpoint/E2E |
|
||||
| Ticket detail/show/query and alias `get_ticket`; edit/event detail and assignment preparation | `TicketAuthority` projection includes open-MR `RuntimeTicketSourceCommitResolver` → synchronous provider HTTP | Mixed stages use finite Host, not sole DB. Subsequent pure assignment mutation stages keep their existing owner | Detail/query held loopback `/v1/repository-refs/observe`; unrelated DB/timer/control progress; cancel retains actual Host budget; overload stays 503. Provider-placement fixture is explicitly unsigned, not proof of signed request authority |
|
||||
| Ticket tracking/case decision authority | Retained assignment/CAS/body/event checks plus `find_workspace_orchestrator` → live `RuntimeRegistry::worker` | Whole existing decision helper on finite Host; transaction and notification order unchanged | Held loopback live Orchestrator lookup for both tracking/case; independent SQL/timer/control; cancelled actual Host lease retained; failed live authority leaves Ticket unchanged. Existing non-assignee/browser bypass denial passes |
|
||||
| Browser Ready | Existing mutation/notifications, followed by detail (including source ref observation) | Mutation and detail use one accepted Host job and explicit `execute_ticket_rest_operation_on_host`, never a second Host admission | Fake promptly denies notification GET, holds the subsequent source-ref POST; exactly one Ready event/readiness is durable before held detail; SQL/timer/control progress and cancelled Host ownership persist. Rejected fixture setup/misidentified notification GET are excluded |
|
||||
| Worker control input/cancel/stop/restore source preflight | Synchronous live source Runtime lookup precedes `resolve_async` and operation admission | `authenticate_worker_mutation_source_owned` admits finite Host; already-owned synchronous callers retain the original helper | Actual control handler's held source GET proves DB/timer/control progress and cancelled finite Host budget; saturation returns availability, not source denial. The fake's lookup fails before an actual Worker cancellation; no product process is used |
|
||||
| Worker observation capture | Source lookup, initial SQL grant, control lock, live grant re-fence and target Runtime lookup, awaited cold protocol connection | Source on Host; initial grant on DB; actual re-fence/live lookup on Host owns the acquired control guard; cold protocol signing retains existing DB stage | Source/permission/cold-signing contracts remain covered separately. Full capture success/held-protocol composition is not claimed by the new source lookup fixture |
|
||||
|
||||
## Regressions and causal checks
|
||||
|
||||
New `server_residual_execution_tests.rs` contains eight focused tests, including
|
||||
three read/Ready and two decision-authority table cases. Exact old methods or the
|
||||
old direct stored-projection placement were restored diagnostically in turn for
|
||||
cancel, repair, restore, detail, tracking, and control. All six fail at their expected
|
||||
first-poll/shared-mutex/independent-SQL boundary. Five-second fixture watchdog
|
||||
release and its induced SQLite BUSY/panic are diagnostic bailout, not progress.
|
||||
The product source is restored in `finally` after each case.
|
||||
|
||||
Artifacts (local, not tracked product code):
|
||||
- `target/t748-residual-old-{cancel,repair,restore,detail,tracking,control}-red.log`
|
||||
- `target/t748-residual-final-restored-green.log`: **26 DB-boundary tests pass**
|
||||
- `target/t748-residual-decision-policy.log`: non-assignee/browser bypass policy passes
|
||||
- `target/t748-residual-root-check.log`: root compile closure passes
|
||||
- `target/t748-residual-provisional-full-suite.log`: original default-parallel Server
|
||||
**979 passed / 0 failed / 1 existing ignored**, binary11; **178.38 seconds**.
|
||||
Only the three deliberate executor unknown-outcome panic diagnostics appeared.
|
||||
No retained test/repro processes were observed after completion.
|
||||
- `target/t748-residual-provisional-workdir-{default,http}.log`: default153 and
|
||||
http-client156 tests pass. This does not complete the pending transitive audit.
|
||||
- fmt/diff and state-contract names **558 / 0 unapproved / 0 stale** pass.
|
||||
|
||||
All Cargo validation uses `target/t748-candidate-build`; no parallelism reduction,
|
||||
production budget increase, skipped tests or mutation retry was introduced.
|
||||
Initial test-only private enum/state/DTO mistakes failed compilation; missing
|
||||
repository seeding and Ready notification GET confusion were diagnosed and fixed.
|
||||
Those attempts are not semantic proof. The full-suite result above is provisional:
|
||||
it does **not** conclude the caller inventory or approval.
|
||||
|
||||
## Remaining inventory (not complete)
|
||||
|
||||
`target/t748-async-entry-candidates.tsv` records 661 lexical async-entry candidates
|
||||
from Server, Worker operations, auth, projection and subscription sources. Visible
|
||||
lane markers/await counts are discovery hints, not an AST/type-checked call graph
|
||||
or proof that all transitive operations are safe. Forwarders, actual handlers,
|
||||
service adapters and callback/background callers must be matched by name and
|
||||
traced through their real dependencies before marking a family inspected.
|
||||
|
||||
| Inventory work | Current status / next evidence |
|
||||
|---|---|
|
||||
| Ticket/MR/Objective/Memory/Subjektiv/Backend Job: canonical/alias/browser/Runtime entries, assignment/routing/decision/projection/publication and callback edges | First committed child result inspected. Major handler owner table returned, but follow-up final result was not observable. Parent released the child and is directly checking remaining adapters/forwarders/launch edges. Macro trait dispatch and representative Objective/Memory/Ticket forwarding plus legacy Memory/cleanup owners inspected; complete per-operation mapping remains open |
|
||||
| Auth/Runtime/Worker/control/observation/resources/Workdir/repository/Drive/settings/config/catalog/uploads/sessions/subscriptions and lifecycle background edges | First committed child result inspected; parent verified the residual structures below against actual source. The follow-up result was not observable after two Idle notifications; parent released the read-only child and directly traced the remaining four edge groups below. This is not delegated completion evidence |
|
||||
| Existing pure DB, mixed Host, mandatory Subject callback and accepted publication boundaries | Earlier documented evidence remains relevant; unchanged code does not exempt newly found composed callers from tracing |
|
||||
| `WorkspaceWorker::stop` first Host result → waiter-owned session close → second Host stage | Parent verified the split in actual source. Structural ownership gap, not yet a cancellation reproducer; tracked below rather than silently marked safe |
|
||||
|
||||
## Additional residuals found before republication (unfixed)
|
||||
|
||||
The first two read-only audit results were inspected through their committed
|
||||
sessions. The parent then read the concrete handler/helper source listed below.
|
||||
These are **static execution-placement/continuation findings**, not new successful
|
||||
endpoint, cancellation or overload tests. None has been repaired or published in
|
||||
this snapshot. The provisional suite above therefore cannot establish safety for
|
||||
these families. Lower recovery/transport edges are still being traced by the
|
||||
parent after releasing the read-only children; this is not independent review.
|
||||
|
||||
`S` below means `crates/workspace-server/src/server.rs` at the frozen hash;
|
||||
`O` means `crates/workspace-server/src/server/worker_operations.rs`.
|
||||
|
||||
| Entry / family | Entry → authorization → synchronous work → completion | Verified residual and required boundary |
|
||||
|---|---|---|
|
||||
| `repository_access_projection`, `repository_ssh_credential_{list,create,generate,get,delete,public_key,rotate}`, `repository_ssh_host_trust_{list,put,get,delete}` | ServerApi entries `S:7879–8107` directly await handlers `S:12934–13129`; owner authentication is awaited first, then active config projection / secret / trust / CAS / audit helpers execute synchronously | Auth ownership does not carry past await. Parent read all handlers and actual `repository_access.rs:391–436` connection reads. Whole existing synchronous operation needs an owner; pure DB and any external provider work must be classified by dependency, not by the SSH label |
|
||||
| `repository_create` → `scoped_create_repository` | Owner authentication await → validation → `config_store.insert_repository` → intent/replay classification → response, `S:23157–23214` | Insert is outside an accepted job. Preserve the existing intact insert/intent/commit helper and successful replay vs conflicting intent semantics |
|
||||
| `repository_ssh_connection_probe`, `repository_ssh_host_trust_confirm` | Owner and active binding awaits → catalog / `probe_repository_ssh_connection` → Runtime observation → trust read/CAS/write → response, `S:23247–23358` | Post-auth mixed work has no finite Host owner. Confirm must keep observed host-key selection and fingerprint comparison before the existing trust mutation |
|
||||
| `worker_session`, `worker_session_history`, `scoped_worker_session_attachment` | Workspace checks → synchronous Runtime Session API → response/body, `S:8696–8769,12011–12069`; registry facade `hosts.rs:2129–2195` | No finite Host admission at these request boundaries. Binding/signing and remote transport dependencies must stay off Tokio and out of the sole DB lane; preserve Session diagnostics and response limits |
|
||||
| `runtime_worker_attachment_upload` → `upload_runtime_worker_file_contract` | Grant claim → registry resolution → Runtime upload → grant completion or cancellation artifact deletion, `S:28081–28152` | Whole body-upload operation is still direct synchronous mixed work, distinct from the already-owned grant/cancel/delete routes. Admission must precede grant claim; accepted upload must own completion and cancellation cleanup |
|
||||
| Drive Worker authorization / `drive_grant_create` | `server_drive_grants.rs:54–74,126–166`: source/header checks → `current_worker_identity` or live Runtime worker → later DB grant precheck/mutation | Pre-DB source/live Runtime lookup has no Host owner. `S:18244–18292` confirms `current_worker_identity` directly reaches synchronous `runtime.worker`. Retain no-actor-fallback policy; owner unavailability must not be misreported as authority denial |
|
||||
| `current_worker_workspace_config_{get,attach,observe,read,commit}` | `S:11625–11699` directly invokes `workspace_config::identity`; `server_workspace_config.rs:65–74` reaches the same synchronous Runtime source helper before later owned DB stages | All five logical-config entries share the unowned identity preflight. Later accepted persistence/publication does not cover this earlier stage |
|
||||
| `workspace_workdir_list` → `scoped_list_working_directories` | DB job `S:25943–25959` → summaries `32974–32999` → all Runtime workdir observations `33515–33524` → list/detail Runtime calls and SQL reconciliation `33421–33467` | Mixed Runtime/SQL helper is incorrectly on the sole DB worker. Preserve live reconciliation and diagnostics, but move the whole mixed stage to finite Host rather than pretending the list is stored-only |
|
||||
| `workspace_config_tree_commit` → `scoped_commit_workspace_config_tree` | DB job `S:13444–13460` → prepare → repository-access projection → config commit → Runtime prompt publication, `13498–13517`; remote publication `hosts.rs:5090–5099` | SQL commit is followed by synchronous network publication inside sole DB job. Keep commit-before-best-effort-publication and accepted ownership; do not leave the continuation on the waiter. Logical config's separate owned Host dispatch is not this UI path |
|
||||
| `repository_{list,detail,log}` and aliases | DB jobs `S:29108–29183` → live repository reader → summary/log provider; `repositories.rs:276–375` invokes Git subprocess for materialized local repositories | Provider work is not pure DB. Mixed catalog/provider work needs finite Host, without changing existing diagnostics for unmaterialized sources |
|
||||
| `worker_control_stop`, `runtime_worker_stop`, `runtime_worker_stop_alias` → `WorkspaceWorker::stop` | `O:379–425`: grant/lock/re-fence → Host #1 Runtime stop returns result/control guard → waiter session lock/close → Host #2 linked Workdir observation/SQL | Structural ownership gap confirmed by parent: accepted Runtime stop has no owner for session close and subsequent Workdir synchronization if its waiter vanishes. `S:18609–18619` awaits real session close; the second Host admission also occurs after side effects. Whole accepted stop must own this continuation without nested Host acquisition. Cancellation reproduction remains pending |
|
||||
|
||||
### Parent takeover of the four remaining Runtime edge groups
|
||||
|
||||
The Runtime child's first result remains useful, but its follow-up final result
|
||||
was not available through authorized observation. The parent did not infer
|
||||
completion from Idle and did not loop Submit or inspect raw session storage.
|
||||
See `docs/report/2026-10-12-worker-observation-followup-gap.md` for the bounded
|
||||
observations and handling. The parent read the following actual source directly:
|
||||
|
||||
| Edge | Source and actual stages | Classification / unresolved contract |
|
||||
|---|---|---|
|
||||
| Embedded protocol connect and method pump | `S:31845–31902` directly calls synchronous `attach_worker_protocol_scoped` before spawning its async pump; the pump directly calls `send_connected_protocol_method_scoped`. `worker-runtime/src/runtime.rs:3486–3598` takes synchronous operation/state locks; Shutdown performs `begin_stop_operation` and `commit_stopped_worker` (`4359–4445`), with durable record/snapshot writes in fs-store builds (`5256–5269`) | **Additional confirmed placement residual**: Backend async connect/pump is not an accepted finite Host owner. The existing endpoint identity/settled-operation checks and commit/publication helpers must remain intact; no Runtime-store refactor is needed |
|
||||
| Workdir creation reservation → Runtime result → finalization | `S:26316–26609`: DB preparation/reservation, Host runtime selection/observation/create, then waiter-admitted failure or final registry/receipt DB jobs. Same-id reentry observes the reserved Runtime Workdir before attempting create (`26473–26517`) | **Confirmed continuation split**, with durable same-operation recovery intent, not automatic mutation retry. Existing recovery does not make the original create job own finalization after its waiter disappears. Final classification/regression must cover accepted Runtime outcome, final receipt, cancellation and overload without creating a second provider operation |
|
||||
| External grant fence → attachment/provider cleanup | `S:25595–25709`: DB authority/read or revoke/fence/audit, then waiter-owned cleanup/provider stop; terminal GET/revoke explicitly retries cleanup. Cleanup itself commits pending, awaits release, then admits completion/audit DB (`25719–25799`). Expiry task retains its async owner and retries (`24790–24854`) | **Confirmed continuation split plus explicit recovery**, not a claim that revocation failed or is unsafe after its DB fence. Grants remain denied by their committed fence. Need causal cancellation/lease evidence for cleanup and preserved retry/expiry policy before choosing the smallest ownership fix |
|
||||
| Command provider acceptance → registration/audit | `S:19507–19631`: Host identity, DB attachment fence, async session/provider, then synchronous command-handle registration. External `operate` admits audit-requested DB, sends provider request with explicit cancel guard, receives result, then admits audit-completed DB (`888–1024`); External command-handle registration follows another await (`1372–1428`). Local command start retains Runtime resources in its actual task and owns terminal-close admission (`workdir/src/local.rs:1831–1897`) | **Partially protected / continuation question**. SQL jobs are owned and local actual command resources are retained; explicit external cancel is not SQL retry. Provider acknowledgement-to-registration can cross a cancellable audit await. Do not assert an orphan process or whole command success without a focused protocol/registration reproducer; do not rewrite external cancellation semantics speculatively |
|
||||
| Catalog and single-workspace shutdown | `S:12222–12279`: catalog waits for HTTP serve, drains Worker projection and owns Feature shutdown DB (`2651–2664`); single-workspace `serve` aborts its hook but calls synchronous Feature shutdown directly. `feature-storage/src/lib.rs:220–241,521–523` fences and waits on connection close. Executor `drain` (`db_executor.rs:290–315`) covers only jobs accepted before its first poll, not later submissions | **Additional confirmed direct shutdown placement residual** in single-workspace serve. Separately, catalog does not demonstrate hook/expiry/Host/cleanup producer quiescence before storage shutdown. Whole producer/drain ordering remains a lifecycle question; no live shutdown was invoked to test it |
|
||||
|
||||
Domain generated adapters, remaining Tool/WIP forwarding, Backend Job / legacy
|
||||
Memory launch lower edges remain under follow-up inspection. Existing domain SQL
|
||||
helpers are not being reimplemented or globally refactored; ownership tracing is
|
||||
separate from re-auditing every SQL semantic branch. None of the additional rows
|
||||
above has new executable regression evidence yet.
|
||||
|
||||
|
||||
T743's additional assignment page/diagnostics/answer APIs are absent from this
|
||||
source. Ticket seq8–9 identifies their separate owner's normal composition with
|
||||
the published T748 facade. This inventory is **not** an attestation of that future
|
||||
combined source; no duplicate API or combined approval is introduced here.
|
||||
|
||||
## Republication conditions
|
||||
|
||||
Review-ready requires a consolidated caller-name list with each entry's auth,
|
||||
SQL/provider/Runtime stage, post-await projection, post-commit publication and
|
||||
owner identified; confirmed residuals repaired with focused causal regressions;
|
||||
remaining uncertainty explicit; and final root/changed-crate/affected-feature,
|
||||
format/diff/name checks on that final source. Only then normal same-selector push,
|
||||
provider exact-HEAD verification and fresh trusted independent review of this MR.
|
||||
No new Reviewer Runtime or separate Coder is created. Read-only audit children do
|
||||
not grant review verdict or integration authority.
|
||||
|
||||
## Scoped caller repair and validation history
|
||||
|
||||
The same Ticket branch is retained for advancing the existing MR. This section
|
||||
records validation history, not approval or integration. The final-validation
|
||||
section below supersedes the intervening failed runs without deleting their evidence.
|
||||
The existing domain helpers,
|
||||
authorization fences, receipt/replay rules, and transaction/publication order
|
||||
remain intact. No automatic mutation retry, production limit increase, nested
|
||||
Host admission, or test parallelism reduction was introduced.
|
||||
|
||||
| Repaired family | Current owner / executable evidence |
|
||||
|---|---|
|
||||
| Repository access/SSH credential and host-trust CRUD, Repository registration | Whole post-owner-auth synchronous operation on DB. Registration regression observes the **config store's actual connection** waiting behind a separate SQLite writer, then cancels the waiter; after drain exactly one Repository exists and the same registration intent returns HTTP200/replayed without another row |
|
||||
| SSH probe/host-trust confirm | Whole post-owner/binding-auth mixed probe/observed-key selection/fingerprint comparison/trust mutation on Host. Existing narrow SSH/trust policy tests pass in the full Server suite; no successful real SSH connection or host-key exchange is claimed |
|
||||
| Repository list/detail/log and aliases | Live Git/catalog helpers on Host, not DB. With DB admission saturated, empty catalog and absent-key detail/log retain their ordinary success/404 responses. This regression proves lane selection, not held Git subprocess behavior |
|
||||
| Worker Session/history/attachment | Typed Session service and attachment handler admit Host before synchronous Runtime observation. Loopback held Runtime lookup proves independent SQL/timer/control progress, cancelled actual lease retention, bounded overload and release after actual drain |
|
||||
| Body upload | Host admission precedes the upload grant claim and owns resolution/upload/completion/cancellation cleanup. The same loopback table holds the Runtime lookup after claim; cancelled waiter leaves actual owner, and provider refusal completes the claim back to Pending. Successful artifact upload/delete and established remote sessions are not exercised by this refusal fixture |
|
||||
| Drive Worker authorization / grant create; all five logical-config identity entries | Live source/target preflight uses Host; later DB authorization and mutations retain their previous transaction owner. Three held-lookup table cases prove independent SQL/timer/control, cancelled lease retention, and typed HTTP503 availability (not false authority denial) when Host admission is full. Existing no-actor-fallback and source-fence policies remain in the suite |
|
||||
| Workdir list | Whole live Runtime reconciliation/SQL helper on Host. Held Runtime list lookup in the Session/Workdir/upload table proves sole DB remains free and cancellation retains the actual Host budget |
|
||||
| UI config commit | Whole existing evaluate/project/commit/best-effort prompt publication helper on Host. Loopback held prompt POST confirms the changed tree is already durable while independent DB/timer/control proceeds. Cancelling the waiter retains publication ownership; refused publication neither repeats nor rolls back the commit |
|
||||
| Worker stop canonical/alias/control entries | One accepted Host workflow owns Runtime stop, session fence/close, stored read and linked Workdir synchronization. An in-process Runtime emits its stop receipt while a real session fence is held; after waiter abort and fence release the registered session is removed. Restoring the exact old stop method makes this test fail at the missing cleanup assertion; restoring the fix passes. No real Worker/product process is spawned or stopped. Linked Workdir provider success is not claimed by this session-only fixture |
|
||||
| Embedded protocol connect/method; single-workspace Feature shutdown | `4d981194` owns these operations on the existing finite Host/DB lanes. Focused protocol and actual Feature connection shutdown regressions remain green in the final suite |
|
||||
|
||||
Final logs in the Workdir (build artifacts, not committed product content):
|
||||
- `target/t748-stop-old-placement-red.log`: old stop fails **missing cleanup**, not timeout.
|
||||
- `target/t748-stop-restored-green.log`: restored accepted-stop ownership passes.
|
||||
- `target/t748-caller-host-green.log`: Session/history/attachment/Workdir/upload table passes.
|
||||
- `target/t748-repository-create-green.log`: actual SQLite commit/cancel/replay passes.
|
||||
- `target/t748-drive-config-preflight-green.log`: all three live authority cases pass.
|
||||
- `target/t748-ui-prompt-owner-green.log`: commit-before-publication passes.
|
||||
- `target/t748-repository-provider-green.log`: all three Repository read lanes pass.
|
||||
- `target/t748-caller-final-root-check.log`: workspace-root `cargo check` passes.
|
||||
- `target/t748-caller-final-server-suite.log`: original default-parallel Server
|
||||
**988 passed, 0 failed, 1 existing ignored**, plus **11 binary tests**, 185.38s.
|
||||
- `target/t748-caller-final-workdir-default.log`: **153** tests pass across targets.
|
||||
- `target/t748-caller-final-workdir-http.log`: **156** tests pass across targets.
|
||||
- fmt/diff checks pass; `target/t748-caller-final-names.log`: **558 / 0 unapproved / 0 stale**.
|
||||
|
||||
Test setup errors are excluded from semantic evidence: the first stop fixture
|
||||
omitted the Runtime's live Worker summary; the Repository busy observer initially
|
||||
watched the general store rather than the config store's distinct connection.
|
||||
Both were corrected before the successful runs. Missing package/Python command
|
||||
and compile-time DTO/Duration/Drive-error mistakes also prove no product behavior.
|
||||
|
||||
### Explicit limits, not an expanding audit gate
|
||||
|
||||
The four lower-edge rows above separate confirmed direct placement repairs from
|
||||
Workdir create / external grant cleanup / provider acknowledgement continuation
|
||||
questions and catalog producer quiescence. The latter are not redesigned here,
|
||||
per the user's instruction not to expand speculative Workdir/grant or unrelated
|
||||
Feature work indefinitely. Their existing durable recovery, explicit cleanup
|
||||
retry and provider cancellation policy are preserved, not reclassified as
|
||||
end-to-end cancellation proof. This report is not a mechanically complete
|
||||
transitive call graph or an assertion that every future/composed caller is safe.
|
||||
T743's separate new API composition still requires its owner's exact combined
|
||||
source validation/review. None of these limits constitutes Ticket conclusion,
|
||||
MR approval, target integration or permission to update the running environment.
|
||||
|
||||
### Post-suite focused validation blocker
|
||||
|
||||
After the successful full suite above, the current candidate was checked with
|
||||
`cargo test -p yoi-workspace-server --lib db_execution_tests` using the same
|
||||
candidate target directory and ordinary parallel execution. Result: **31 passed /
|
||||
1 failed**, in 8.06s. Failure:
|
||||
`cancelled_runtime_key_revoke_commits_audit_and_removes_broker_registration`
|
||||
reported the shared `observed` helper's two-second `Elapsed(())` timeout, without
|
||||
identifying which of its several lifecycle waits timed out. Source inspection
|
||||
confirms projection shutdown is already present in this fixture; it is not
|
||||
legitimate to attribute the failure to omitted projection shutdown, treat it as
|
||||
load-only, increase limits, reduce parallelism, or rerun until green.
|
||||
|
||||
Evidence is preserved in `target/t748-caller-final-boundaries.log`. The prior
|
||||
full-suite success is real but insufficient to declare final validation complete.
|
||||
The new caller and stop cases all passed in this focused run. Next diagnosis must
|
||||
identify the exact wait and inspect actual HTTP/job/broker ownership events before
|
||||
choosing a fixture or product repair. No normal push, fresh review, approval,
|
||||
integration or Ticket conclusion was performed for this candidate.
|
||||
|
||||
## Continued diagnosis and final validation
|
||||
|
||||
Returning the failed test as a stop condition was a workflow mistake, not an
|
||||
external outage, lost authority, or additional audit approval gate. Work continued
|
||||
on the same branch. The failed run above is retained as evidence.
|
||||
|
||||
The `observed` helper now reports its caller location. A diagnostic 32-case run
|
||||
passed; that result alone was **not** treated as a diagnosis or used to erase the
|
||||
failure. Source tracing identified an uncontrolled cold broker signing producer
|
||||
in the revoke fixture. The test now receives the actual signed WebSocket
|
||||
handshake and drains its completed DB work **before** holding the revoke writer.
|
||||
The handshake remains pending, so broker shutdown is still tested. An early HTTP
|
||||
response is selected against actual SQLite entry, reporting status/body rather
|
||||
than waiting for an event that can no longer occur. The original failed run did
|
||||
not identify its exact wait; attributing it conclusively to signing would exceed
|
||||
the captured evidence.
|
||||
|
||||
Subsequent full runs exposed the Ready table's distinct failure **before** source
|
||||
POST arrival (caller location, not timer/control failure). Artifacts:
|
||||
`target/t748-post-fixture-server-suite.log` and
|
||||
`target/t748-final-framing-server-suite.log`. The HTTP fake previously assumed
|
||||
one TCP read contained the request line and answered without consuming a body.
|
||||
It now parses the complete header/body; a deterministic two-byte-fragment reader
|
||||
proves complete frame consumption and truncated-body rejection. This is a real
|
||||
fixture flaw but does not by itself establish the historical timeout cause.
|
||||
|
||||
Ready setup includes mutation and best-effort notification before the source
|
||||
POST. The held-provider arrival now uses the existing five-second fixture
|
||||
watchdog as its setup bound, selected against handler completion. The subsequent
|
||||
**timer and independent SQL/control observations retain their two-second budget**;
|
||||
actual held-request cancellation/lease/overload/cleanup assertions are unchanged.
|
||||
Production admission limits, normal test parallelism, and provider timeout are
|
||||
unchanged. This setup-bound change is explicit, not a hidden limit increase or
|
||||
claim that Ready completes within two seconds under a whole-suite workload.
|
||||
Restoring the exact published old Ready method still fails this revised test
|
||||
(`target/t748-ready-old-boundary-red.log`, Ready returns only after synchronous
|
||||
provider wait); restored code passes, so the offload distinction is not weakened.
|
||||
|
||||
Final code validation after these fixture changes:
|
||||
- `target/t748-boundary-setup-fixed-green.log`: **33 DB-boundary cases pass**.
|
||||
- `target/t748-final-setup-root-check.log`: root compile closure passes.
|
||||
- `target/t748-final-setup-server-suite.log`: original default-parallel Server
|
||||
**989 passed / 0 failed / 1 existing ignored**, **11 binary tests**, 189.66s.
|
||||
- `target/t748-final-setup-workdir-default.log`: **153 pass** across targets.
|
||||
- `target/t748-final-setup-workdir-http.log`: **156 pass** across targets.
|
||||
- `cargo fmt --all -- --check`, `git diff --check HEAD`, and state-contract names
|
||||
**558 / 0 unapproved / 0 stale** pass.
|
||||
|
||||
No failed semantic run was merely repeated until green: the intervening source
|
||||
changes and the limits of each diagnosis are recorded above. These results support
|
||||
publication for fresh exact-source independent review, not reviewer approval,
|
||||
MR integration, Ticket conclusion, or updates to the live dogfooding environment.
|
||||
@@ -0,0 +1,444 @@
|
||||
# T-748: default-parallel suite failure diagnosis
|
||||
|
||||
## Sources and preserved observations
|
||||
|
||||
- Original local candidate: `61533fadb6b39465af60cb55aed2b4d0650319cd`.
|
||||
- Comparison source: `56795fb92cb9def9bcd701bd51d92e99526f8eff` (develop/T742).
|
||||
- Same implementation branch: `work/T-748-bounded-db-execution`.
|
||||
- The original `target/t748-server-tests.log` remains untouched. Its 97 FAILED
|
||||
lines and 600-second timeout were symptoms, not proof of one cause.
|
||||
- Initial diagnosis used `cargo test -p yoi-workspace-server -- --nocapture`,
|
||||
default libtest parallelism, without changing queue limits, features, or startup
|
||||
settings. `target/t748-diagnostic-environment.txt` records the environment;
|
||||
this host reports 24 available CPUs. Diagnostic captures were bounded to
|
||||
90/150 seconds to obtain errors before the original timeout, not counted as
|
||||
successful full-suite runs.
|
||||
|
||||
Logs under `target/` are local diagnostic artifacts, not tracked review inputs.
|
||||
This report records their meaning and the permanent regressions that reproduce it.
|
||||
|
||||
## 1. Different fixtures consumed one global Host admission budget
|
||||
|
||||
The first non-intentional errors in `target/t748-server-nocapture.log` were
|
||||
`DbCapacityExceeded` in manual Worker setup (`server.rs` at the then-current
|
||||
line 50614), followed by assignment fixture construction (52990/53045) and
|
||||
HTTP 503 responses. The deliberate before/after-commit executor panic tests
|
||||
are different: those passed and verified unknown-outcome diagnostics.
|
||||
|
||||
Temporary submit/start/cleanup instrumentation recorded submitting test names,
|
||||
closure types, actual job IDs and the execution-owner identity. It showed a
|
||||
single Host lane with `max=18`, with accepted jobs from unrelated fixtures.
|
||||
A rejection snapshot contained `{32,45,46,...,61}`. The complete diagnostic
|
||||
capture later contained cleanup for every submitted Host job on that owner;
|
||||
it did not show permanently abandoned accepted Host jobs. Instrumentation was
|
||||
removed before the source was committed/published.
|
||||
|
||||
`target/t748-live-process-18.txt` sampled the test process and threads at the
|
||||
actual rejection. That sample had 126 threads; the Host workers were runnable,
|
||||
and the process was using approximately 17 CPU cores. There was no captured
|
||||
thread-creation EAGAIN/unavailable error. This evidence does not establish an
|
||||
OS thread/CPU hard limit as the cause. No test processes remained after the
|
||||
bounded diagnostic run or the completed suite.
|
||||
|
||||
A representative failure passed alone (0.56 seconds); the eight logging cases
|
||||
passed with four test threads (2.46 seconds). The isolated comparison source's
|
||||
full default-parallel suite passed: 931 library tests, one pre-existing ignored
|
||||
migration fixture, 11 binary tests; library duration 168.74 seconds. This did
|
||||
not prove that all new failures were capacity-related, but did distinguish the
|
||||
new shared-admission rejection from an observed baseline failure.
|
||||
|
||||
### Ownership fix (`f3d4aba5`)
|
||||
|
||||
Production budgets remain shared and finite: DB 1 worker/32 queued, Host 2/16,
|
||||
cleanup 2/16. Ordinary fixtures now explicitly own a finite DB executor and lazy
|
||||
Host/cleanup owners at those same limits. API clones, child Workspace APIs, and
|
||||
weak retention adapters use their injected owner. No global fixture lane cache,
|
||||
parallelism reduction, unlimited queue, or capacity-wait retry was added.
|
||||
|
||||
The permanent saturated-Host regression fills both running slots and all 16
|
||||
queued slots, cancels waiters, advances paused Tokio time, and still observes
|
||||
rejection until actual completion. Another fixture and the separate cleanup lane
|
||||
can progress; draining restores the original budget and completes exactly 18
|
||||
accepted jobs. Existing real-SQLite cancellation/lease/drain tests remain active.
|
||||
|
||||
## 2. SQL offload invalidated fixture assumptions about first poll and publication
|
||||
|
||||
After Host isolation the default-parallel suite finished in 171.57 seconds:
|
||||
954 passed, three failed, one existing ignored. Actual errors were:
|
||||
|
||||
- removal subscriber saw a legitimate queued Runtime stop Upsert before Removed;
|
||||
- external session-open expiry exceeded its one-second bound while its DB lane
|
||||
was still shared across other fixtures;
|
||||
- grant replacement returned success because one initial poll had only submitted
|
||||
the offloaded authority read, not reached the held original-grant lock.
|
||||
|
||||
The ordinary DB fixtures were isolated too. The one-second expiry assertion was
|
||||
not increased. Grant testing now drains its actual authority read then polls the
|
||||
saved response to reach the held lock before replacing the grant. Removal testing
|
||||
observes the committed stopped projection before taking the removal baseline.
|
||||
The Removed payload assertion is unchanged. These are observable synchronization,
|
||||
not sleeps or retries. Focused expiry, grant, and removal tests all passed.
|
||||
|
||||
A captured cleanup job also attempted to poll a Tokio timer after its fixture
|
||||
runtime had shut down. The terminal checker fixture now retains that original
|
||||
runtime through accepted Host and cleanup jobs, then stops projection producers
|
||||
and drains actual DB work before ending. Terminal SQL state is not treated as
|
||||
actual cleanup completion. The subsequent full run contained only the three
|
||||
intentional executor panic diagnostics, not the shutdown-context panic.
|
||||
|
||||
The synchronization/teardown changes are in `df9d056d`.
|
||||
|
||||
## 3. Restore intent's DEFERRED read-to-write upgrade returned SQLite BUSY
|
||||
|
||||
The next default-parallel run finished in 171.48 seconds with 956 passed, two
|
||||
failed, one existing ignored. Both failures were SQLite `DatabaseBusy`, extended
|
||||
code 5, not capacity rejection:
|
||||
|
||||
- production-profile zero-input Orchestrator restore;
|
||||
- pending manual Worker claim restore reconciliation (500 instead of 409).
|
||||
|
||||
Both failed alone too. `target/t748-busy-origin.log` captured the error and a
|
||||
backtrace through `pin_internal_worker_restore_intent` -> the transaction helper
|
||||
-> internal restore -> manual claim. The journal read authority first in a
|
||||
DEFERRED transaction while the offloaded projection's other SQLite connection
|
||||
could write. Such an upgrade can return BUSY without invoking SQLite's busy
|
||||
handler; treating this as a retryable whole mutation would be incorrect.
|
||||
|
||||
A new real-SQLite regression holds an IMMEDIATE writer on another connection,
|
||||
registers an owned per-connection busy observer, and attempts one journal pin.
|
||||
The old helper fails deterministically with BUSY/5 before waiting for ownership
|
||||
(`target/t748-deferred-upgrade-red.log`, 0.23 seconds). The fixed helper waits
|
||||
before its first authority read, while a current-thread timer and control task
|
||||
progress. After releasing the writer it persists exactly one requested tuple;
|
||||
there is no application-level mutation retry.
|
||||
|
||||
`f597f1b5` makes this existing mutation helper explicitly
|
||||
`with_immediate_transaction`. Restore journal and deletion authority reads,
|
||||
mutation and commit remain in one transaction. Focused DB/HTTP tests (8), the
|
||||
original restore and claim cases, and deletion tests (13) passed.
|
||||
|
||||
## 4. Why a pre-dispatch failure could become the 600-second suite timeout
|
||||
|
||||
The original long-running logging case joined an HTTP request with a fake provider
|
||||
waiting for command dispatch. On pre-dispatch rejection the HTTP future can finish
|
||||
with 503 while the receiver remains Pending: its channel is still owned by the
|
||||
fixture, but no command will arrive. An unbounded `join!` waits forever in that
|
||||
state and hides the actual error behind the outer suite timeout.
|
||||
|
||||
The permanent `saturated_host_before_command_start_returns_availability_without_a_provider_operation`
|
||||
regression uses the real signed HTTP route with a controlled full Host budget. It
|
||||
observes the final 503/`db_capacity_exceeded` response and the still-live Pending
|
||||
provider receiver, with no process or command dispatch. The original logging
|
||||
fixture now asserts an early HTTP response before waiting for both branches, so
|
||||
an unexpected rejection reports its body immediately rather than hanging. This
|
||||
reproduces the causal timeout mechanism; the old log itself has no stack trace
|
||||
from the hung provider future.
|
||||
|
||||
The nine logging cases pass together at default parallelism (`49bfbfb2`).
|
||||
|
||||
## Artifact/source isolation during comparison
|
||||
|
||||
Initially the archived baseline used the existing Cargo target directory. That
|
||||
replaced a same-package artifact/fingerprint; one later post-fix representative
|
||||
command ran the baseline's 932-test binary (and `db_executor --list` had no tests).
|
||||
That result was rejected as candidate evidence. All later candidate checks/tests
|
||||
use `--target-dir target/t748-candidate-build`, separate from the baseline cache.
|
||||
This changes artifact location, not test parallelism, features or admission policy.
|
||||
The fresh candidate build listed the expected executor tests and total test count.
|
||||
|
||||
## Validation and remaining composition boundary
|
||||
|
||||
Pre-review code source `49bfbfb2` passed the full default-parallel Server suite,
|
||||
including the command-overload case: 960 passed, zero failures, one existing
|
||||
ignored migration fixture; 11 binary tests, library duration 175.29 seconds.
|
||||
The only captured panics were the three deliberate unknown-outcome tests.
|
||||
Root `cargo check` compile closure passed (including TUI/Server), as did Workdir
|
||||
default (153 tests) and `http-client` (156 tests) full suites, format/diff checks
|
||||
and state-contract names (558 matches, zero unapproved, zero stale exceptions).
|
||||
These commands used the isolated candidate artifact directory; libtest default
|
||||
parallelism and the production budgets were unchanged. The MR records the exact
|
||||
published source, which also includes this report and the boundary document.
|
||||
|
||||
## Post-publication independent review and causal fixes
|
||||
|
||||
MR `01a12d3f-e90c-7b02-9ed9-cf3bd2e822a1` seq3 independently reviewed published
|
||||
source `66bb9d0b` and requested changes despite the successful original suite.
|
||||
Its two major findings exposed boundaries the earlier tests did not prove:
|
||||
|
||||
- `T748-DB-NETWORK-LANE`: mixed Subjektiv helpers could wait for synchronous
|
||||
Runtime HTTP on the sole DB worker. Fix `d3fcfb29` places session read/search,
|
||||
subject projection, memory staging, and legacy consolidation-scope helpers on
|
||||
the existing finite Host owner; pure DB-resident operations keep DB placement.
|
||||
Whole transaction helpers remain intact, and no Runtime I/O is introduced
|
||||
inside a SQL transaction.
|
||||
- `T748-ASYNC-PROTOCOL-SIGNING`: cold protocol source lookup called live binding
|
||||
checks and signing directly on Tokio. Fix `c0223a0d` awaits the owned DB stage.
|
||||
The source API now propagates failure explicitly: an invalid live binding or
|
||||
signing/admission failure cannot be hidden as `None` or a legacy bearer fallback.
|
||||
|
||||
Permanent real loopback HTTP regressions hold upstream Runtime replies during
|
||||
session read/search, subject and legacy-scope requests, while independently
|
||||
observing SQL, timer and control progress. Cancelling waiters retains the actual
|
||||
Host lifecycle lease until completion. Cold protocol source tests control another
|
||||
SQLite writer and shared connection mutex wait, and verify bounded overload,
|
||||
fresh signing and revocation without fallback. Existing queue/cancellation and
|
||||
deletion evidence now observes the actual mutation owner; the mixed fixtures
|
||||
explicitly inject a small finite Host budget. Production budgets are unchanged.
|
||||
|
||||
Focused boundary tests passed (10). Restoring the old placement produced a
|
||||
failing regression, and fixed placement passed; an earlier syntax-rejected
|
||||
instrumentation attempt is excluded from evidence. Diagnostic artifacts under
|
||||
`target/` are not production source or replacement domain implementations.
|
||||
|
||||
Exact code source `c0223a0d` then passed root `cargo check` and the original
|
||||
**default-parallel** Server suite: **962 passed, zero failed, one pre-existing
|
||||
ignored**, 11 binary tests; library duration **173.36 seconds**. Only the three
|
||||
intentional executor panic diagnostics appeared, with no residual test processes.
|
||||
Workdir default (153) and `http-client` (156) full suites, format/diff checks and
|
||||
state-contract naming (558 matching lines, zero unapproved, zero stale) passed.
|
||||
All used the isolated `target/t748-candidate-build` artifact directory. Logs:
|
||||
`target/t748-review-fix-{root-check,full-suite,workdir-default,workdir-http,format,names}.log`.
|
||||
The documentation-only publication `b10b7315` did not change that tested code.
|
||||
MR seq5 independently confirmed the two old fixes and repeated the checks above,
|
||||
but requested changes for a new mandatory-callback cycle; see the next section.
|
||||
|
||||
## Mandatory callback must be independent of its waiting Host parent
|
||||
|
||||
MR seq5 finding `T748-HOST-CALLBACK-CYCLE` traced Host create/restore -> Runtime
|
||||
bootstrap -> mandatory Session attribution -> the same finite Host lane. Two
|
||||
waiting parents could consume both workers while successfully admitted callbacks
|
||||
could not run. Cancelling a waiter correctly retains the actual parent, so it is
|
||||
not a solution. The Reviewer's compiled executor artifact proved this placement
|
||||
cycle, not a complete create endpoint/E2E reproduction.
|
||||
|
||||
Fix `a2487b57` separates store-only scope discovery into typed Subject, current
|
||||
Job consolidation and legacy consolidation authority. Session attribution accepts
|
||||
only Subject authority and executes its whole existing SQL operation on the
|
||||
independent DB lane. It rejects consolidation roles without calling Runtime.
|
||||
Mixed read/search, subject projections and allowed legacy consolidation operations
|
||||
keep their Runtime checks on Host; the previous DB/network fix is not undone.
|
||||
|
||||
The same dependency audit identified Subject resident context reads used by
|
||||
Runtime bootstrap/restore. All Subject-only memory operations use store-only
|
||||
Subject authority and DB ownership too (resident summary/context, proposal
|
||||
validation, receipt lookup, explicit staging). Other memory operations retain
|
||||
Host ownership because legacy authority can require synchronous Runtime lookup.
|
||||
No transaction is split across an await and no production budget is increased.
|
||||
|
||||
The strengthened signed route regression holds both actual production-sized Host
|
||||
workers (2/16) in `run_host_workflow` parents and retains their create admission
|
||||
leases until callbacks finish. Resident and attribution routes authenticate real
|
||||
Runtime source proofs, check current singleton ownership, respond successfully,
|
||||
and persist both distinct Subject session attributions **before** either parent
|
||||
releases capacity. It also preserves Session callback reentry during deletion
|
||||
drain. Runtime's wait is modeled at this policy boundary; no product process or
|
||||
complete create endpoint is spawned. Separate denial coverage proves legacy
|
||||
consolidation callbacks return 403 without Runtime lookup, leave no attribution,
|
||||
and do not bypass authentication (401).
|
||||
|
||||
Only Session attribution is an allowed deletion-drain callback; that endpoint
|
||||
allowlist was not expanded. An initial fixture sent resident reads during deletion
|
||||
and correctly received 409. The fixture now tests those reads before deletion,
|
||||
then Session attribution while deletion waits. This is alignment with the existing
|
||||
fence, not a relaxed product gate or success-picking retry. A diagnostic Python
|
||||
invocation was unavailable before making any source change; only the subsequent
|
||||
Deno lane-restoration runs are causal red evidence.
|
||||
|
||||
Restoring just Session's old Host placement fails at its expected callback
|
||||
watchdog; restoring just resident memory's old Host placement fails at its own
|
||||
watchdog. Fixed placement succeeds without parent bailout. Evidence:
|
||||
`target/t748-callback-old-{session,resident}-placement-red.log`,
|
||||
`target/t748-callback-restored-green.log`. Final focused signed callback tests (5),
|
||||
DB boundaries (10), and Subjektiv regressions (25) passed.
|
||||
|
||||
Exact code `a2487b575df1f348251214c53da61595860fcb40` passed root `cargo check` and
|
||||
original default-parallel Server **963 passed / 0 failed / 1 existing ignored**,
|
||||
11 binary tests; library duration **173.01 seconds**. Only the three intentional
|
||||
executor panics appeared, with no residual test processes. Workdir default153 /
|
||||
http-client156, fmt/diff and naming558/0/0 passed. The isolated candidate cache
|
||||
remains in use. Logs: `target/t748-callback-{root-check,full-suite,workdir-default,workdir-http}.log`.
|
||||
The docs-only publication `27b6c688` changed no tested code. MR seq7 independently
|
||||
confirmed the callback fix and earlier fixes, but identified another direct async
|
||||
caller; its independent verdict was `request_changes`, not approval.
|
||||
|
||||
## Worker discovery and adjacent metadata caller audit
|
||||
|
||||
MR seq7 major `T748-ASYNC-WORKER-DISCOVERY` traced async discovery directly into
|
||||
synchronous `workers_response`. That helper acquires the shared SQL connection
|
||||
for the Worker projection snapshot, Workdir registry/links and authority projection.
|
||||
The Reviewer's independently compiled public snapshot helper reproduced a
|
||||
300.246ms shared-mutex stall while its Tokio timer could not progress. This was
|
||||
helper-boundary evidence, not an authenticated endpoint/E2E run.
|
||||
|
||||
Fix `dbcea6c3` awaits the **whole existing** `workers_response` on the independent
|
||||
bounded DB owner. Source-proof requirement, Workspace/query/cursor validation,
|
||||
visibility filtering, pagination and control-grant behavior are unchanged. The
|
||||
other production callers were traced: Worker list/resource detail already use DB;
|
||||
mixed Runtime cleanup plans use Host. No network work is added to the DB owner.
|
||||
|
||||
The adjacent metadata audit found async `workspace_runtime_resources_response`
|
||||
also directly calling synchronous Runtime summaries (including remote signed HTTP
|
||||
and its awaited DB authorization). This call now uses finite Host ownership,
|
||||
then the existing independent async binding read. Runtime list/detail share this
|
||||
boundary. Whole SQL helpers, admission budgets and authentication fallback rules
|
||||
are not changed.
|
||||
|
||||
The permanent post-auth discovery handler regression uses a separate SQLite
|
||||
IMMEDIATE writer and busy observer to hold the actual shared connection mutex.
|
||||
While the accepted discovery read is queued, current-thread timer and independent
|
||||
Host control progress. A second read receives 503/`db_capacity_exceeded`; a source
|
||||
without proof receives 403 before admission. Cancellation retains the actual
|
||||
queued read's lease/budget until result cleanup; ordinary completion preserves the
|
||||
empty filtered catalog response. Signed route proof verification remains covered
|
||||
by the existing dedicated-permission test, separately from this post-auth policy
|
||||
boundary so middleware's own DB wait cannot hide the handler bug.
|
||||
|
||||
Restoring the exact old discovery call fails its first-poll assertion after the
|
||||
fixture watchdog releases the synchronous mutex wait. Restoring only the old
|
||||
Runtime-summary placement fails because Tokio cannot observe the real loopback
|
||||
request until the upstream watchdog releases it. Fixed summary placement lets
|
||||
SQL/timer/control progress during the held signed upstream request and keeps the
|
||||
actual Host lease after cancellation. Explicit upstream-release observation
|
||||
prevents watchdog failure cleanup from masquerading as progress. Logs:
|
||||
`target/t748-discovery-old-placement-red.log`,
|
||||
`target/t748-runtime-summary-old-placement-red.log`,
|
||||
`target/t748-discovery-summary-fixed-boundaries.log` (12 passed),
|
||||
`target/t748-discovery-summary-policy.log` (4), and callbacks (5).
|
||||
|
||||
Exact code `dbcea6c34ba55453ce588d68272df238cde19f47` passed root `cargo check` and
|
||||
original default-parallel Server **965 passed / 0 failed / 1 existing ignored**,
|
||||
11 binary tests; library duration **175.00 seconds**. Only three deliberate
|
||||
executor panics appeared, with no residual test processes. Workdir default153 /
|
||||
http-client156 and fmt/diff/naming558/0/0 passed. Logs use the same isolated
|
||||
candidate cache: `target/t748-discovery-summary-{root-check,full-suite,workdir-default,workdir-http}.log`.
|
||||
Docs-only publication `b63bdb44` changed no tested code. MR seq9 independently
|
||||
confirmed these fixes, then requested changes for Runtime management's residual
|
||||
synchronous authority calls; it was not an approval of the complete source.
|
||||
|
||||
## Runtime management: authority, network, and accepted publication ownership
|
||||
|
||||
Seq9 major `T748-ASYNC-RUNTIME-MANAGEMENT` identified registration's direct
|
||||
`get_validated` signing identity read and post-ping direct live-binding fence.
|
||||
The Reviewer reproduced both exact compiled helpers waiting approximately 300ms
|
||||
on the shared SQL mutex with no Tokio timer progress (helper-boundary, not endpoint
|
||||
or E2E proof). Registration's synchronous Runtime Worker scan also requires a
|
||||
network/authority boundary; ping previously used an unbounded blocking admission.
|
||||
|
||||
Fix `925bce2a` introduces whole owned DB stages for validated active signing
|
||||
identity and the post-ping current binding fence. Runtime Worker scans and ping
|
||||
use existing finite Host admission. A changed/revoked binding still produces
|
||||
conflict rather than attesting the earlier connection; owner/key/CAS validation
|
||||
and existing whole store transactions are retained.
|
||||
|
||||
The adjacent management audit also closes cancellation separation between SQL
|
||||
commit and local Runtime publication. Registration and metadata updates now own
|
||||
mutation, expectations/registry/subscription publication, and response observation
|
||||
in one accepted Host workflow, with their SQL helper awaited on the independent
|
||||
DB owner. Public Runtime resource/detail helpers admit ownership; the already-owned
|
||||
workflows call explicit `_on_host` variants directly instead of reacquiring the
|
||||
same lane. There is no Runtime/network await inside a SQL transaction or nested
|
||||
Host admission. A cancelled waiter cannot strand a committed metadata change
|
||||
without publishing the matching binding.
|
||||
|
||||
Launch options were another mixed Runtime summary/config helper placed on sole
|
||||
DB. Its signed Runtime authorization could enqueue DB work behind its own waiting
|
||||
parent. It now uses Host, preserving SQL/control progress and finite ownership.
|
||||
The audit traced remaining signing validation/binding-fence calls: UI signing
|
||||
operations already use DB, Runtime gate calls occur on Host, and removal already
|
||||
has an owned Host workflow. DNS validation stays async; pure local registration
|
||||
construction/notification stays in the accepted publication owner.
|
||||
|
||||
Permanent regressions cover both authority stages under a real separate SQLite
|
||||
IMMEDIATE writer and shared-mutex busy observer: current-thread timer/control
|
||||
progress, overload503, cancelled actual DB lease retention/cleanup, positive
|
||||
validation and revoked binding409. An actual signed loopback ping is held while
|
||||
SQL contention starts; after its reply the real handler's post-ping fence queues
|
||||
without blocking Tokio or Host control. Another signed loopback scan proves SQL/
|
||||
timer progress and retained cancelled finite Host admission. The metadata mutation
|
||||
case cancels while its own SQL is waiting, then observes one durable update and
|
||||
an equal published binding after actual Host/DB drain. Producers are stopped and
|
||||
drained while the original fixture runtime remains alive.
|
||||
|
||||
Old identity, binding, scan and launch placements each fail their expected
|
||||
contention/watchdog boundary; fixed code passes. Logs:
|
||||
`target/t748-management-old-{identity,binding,scan,launch}-placement-red.log`,
|
||||
`target/t748-management-final-restored-green.log` (16 boundaries), registration
|
||||
policy11 and connection policy13. A zero-match launch-options exploration is not
|
||||
counted as proof; its real held-summary case is in the 16 boundaries. The first
|
||||
fixture teardown named an unavailable method and failed compilation; it was
|
||||
corrected to the existing `shutdown_async`, not counted as a semantic test run.
|
||||
|
||||
Exact code `925bce2a405b6d3255887fba88867ab8d23882dc` passed root `cargo check` and
|
||||
original default-parallel Server **969 passed / 0 failed / 1 existing ignored**,
|
||||
11 binary tests; library duration **172.25 seconds**. Only three deliberate
|
||||
executor panics appeared, with no residual test processes. Workdir default153 /
|
||||
http-client156, fmt/diff/naming558/0/0 passed. Same isolated cache; evidence logs:
|
||||
`target/t748-management-{root-check,full-suite,workdir-default,workdir-http}.log`.
|
||||
Docs-only publication `6d8c49b7` changed no tested code. MR seq11 independently
|
||||
confirmed those fixes and repeated the full validation, but requested changes for
|
||||
cancelled trust-key revocation; it did not approve the complete snapshot.
|
||||
|
||||
## Trust-key revocation must own post-commit subscription termination
|
||||
|
||||
Seq11 major `T748-RUNTIME-REVOKE-CANCEL-PUBLICATION` reproduced the authenticated
|
||||
public DELETE trust-key route waiting for an actual SQLite writer. Cancelling its
|
||||
HTTP waiter did not cancel accepted SQL: revoke, binding-ID replacement and audit
|
||||
committed, but waiter-owned expectation removal and broker unregister were lost.
|
||||
The independent artifact used the normal public Server library's inner router,
|
||||
not outer Workspace dispatch or live-stream/E2E. New signed requests still fail
|
||||
the live binding fence; that does not shut down an already connected subscription.
|
||||
|
||||
Fix `1a065db0` gives the whole key-revoke outcome one accepted finite Host owner:
|
||||
intact CAS/audit SQL on the independent DB lane, local expectation removal, broker
|
||||
unregister/Shutdown, and response observation. Owner/scope/input preflight, typed
|
||||
trust conflicts and current-binding error responses remain unchanged. Response
|
||||
reads use the already-owned `_on_host` detail helper, with no nested Host admission.
|
||||
Admission/unknown-outcome errors retain the normal typed availability mapping;
|
||||
there is no transaction split, new queue budget or automatic mutation retry.
|
||||
The adjacent key-mutation caller audit confirms registration and metadata already
|
||||
own publication and this is the sole production key-revoke caller.
|
||||
|
||||
The permanent cancellation regression exercises the **real outer Workspace
|
||||
dispatch**, owner browser cookie, generated DELETE route, whole store mutation and
|
||||
broker. Projection producers stop before the write lock is acquired, so the
|
||||
fixture-local busy observer identifies this actual revoke transaction, not startup
|
||||
SQL. Timer/control progress before the watchdog releases SQLite. After waiter
|
||||
cancellation, the real admitted RequestLease keeps deletion Pending. Releasing the
|
||||
writer and draining actual Host/DB owners persists exactly one revoke audit,
|
||||
changes binding ID, removes expectations and broker registration, and delivers
|
||||
`Closed/ServerShutdown` to the downstream. The loopback endpoint holds a WebSocket
|
||||
handshake; this proves broker termination, not an established upstream socket or
|
||||
complete product E2E. Existing broker protocol tests cover socket replacement.
|
||||
|
||||
A separate full-Host route regression observes 503 before mutation and unchanged
|
||||
binding, audit and publication. Restoring only the exact old revoke method fails
|
||||
both permanent tests: the cancelled job leaves broker registration behind, and
|
||||
under overload the old handler commits revoke before its response helper returns
|
||||
503. Fixed code passes both without retry or reduced parallelism. Evidence:
|
||||
`target/t748-revoke-final-old-publication-red.log`,
|
||||
`target/t748-revoke-fixed-boundaries.log` (18), `target/t748-revoke-policy.log` (3),
|
||||
`target/t748-revoke-binding-policy.log` (16).
|
||||
An initial counter probe outside dispatch was invalid because dispatch replaces it
|
||||
with the real RequestLease; it was corrected to observe actual deletion drain.
|
||||
A test-only overload channel type-inference compile rejection was corrected with
|
||||
an explicit unit channel. Neither setup error is counted as semantic evidence.
|
||||
|
||||
Exact code `1a065db0fc5d07e2dcc1b9dac2fcfc0607b9a23c` passed root `cargo check` and
|
||||
the original default-parallel Server **971 passed / 0 failed / 1 existing ignored**,
|
||||
11 binary tests; library duration **173.05 seconds**. Only three deliberate executor
|
||||
panic diagnostics appeared, and no retained test/repro processes were observed.
|
||||
Workdir default153/http-client156, fmt/diff and naming558/0/0 passed. All Cargo
|
||||
checks/tests use the isolated candidate cache. Logs:
|
||||
`target/t748-revoke-{root-check,full-suite,workdir-default,workdir-http,fmt,names}.log`.
|
||||
Docs-only source `ebce7ab7` changed no tested code. MR seq13 independently confirmed
|
||||
the revoke ownership fix and repeated the full checks, but requested changes for
|
||||
Ticket cancellation, selector repair and post-restore projection's async callers.
|
||||
The current uncommitted follow-up and the requested comprehensive caller audit
|
||||
are tracked in [the caller inventory](2026-10-12-t748-caller-inventory.md).
|
||||
Successful suites are not evidence that uninspected caller boundaries are safe.
|
||||
|
||||
No latency benchmark, production incident measurement, target integration,
|
||||
Ticket conclusion, or running-environment update is claimed. T743 has now
|
||||
published its caller inventory/source; its owner will compose the T748 facade and
|
||||
new callers, then obtain review of that exact combined source. T748 does not copy
|
||||
those domain APIs or wait on the former unpublished branch.
|
||||
@@ -0,0 +1,34 @@
|
||||
# T748 / T743 orchestrated composition
|
||||
|
||||
## Exact inputs and ownership
|
||||
|
||||
- Integrated standalone T743 target: `05ba6a43adafc2a74fac29295b906bcb30f83f11`.
|
||||
- Independently approved T748 source: `e436b2ae58e940db416a5d6a9c2edb1368ec7600`.
|
||||
- Shared original develop base: `56795fb92cb9def9bcd701bd51d92e99526f8eff`.
|
||||
|
||||
T743's corrective revert deliberately removed the prematurely imported T748 tree while preserving published history. Ordinary merge therefore reports historical modify/delete conflicts; explicit composition against the original develop base restores the approved T748 platform while retaining standalone T743's public APIs/UI/Tools/Prompt. The resulting commit has both real input parents: no history rewrite, substituted source candidate, or change to T743's concluded requirements. The Orchestrator owns this composition and target integration; T743 is not reopened or gated on another lane.
|
||||
|
||||
## New caller execution boundaries
|
||||
|
||||
- `ticket_assignments_page` and `ticket_assignment_diagnostics`: owned clones and reference/scope lookup plus the whole existing synchronous query helper run on the shared finite DB executor.
|
||||
- `ticket_assignment_answer`: mixed Runtime source discovery, intact source/CAS/replay/audit/receipt/commit helper, and post-commit orchestrator discovery/delivery run under one accepted finite Host owner. Runtime/network waits never occupy the sole DB worker. The transaction is not divided by awaits, nested Host admission is not introduced, and request cancellation does not cancel/replay accepted work or lose commit-before-publication responsibility.
|
||||
- Browser forwarders remain delegates to those canonical methods; no second domain authority or DTO is introduced.
|
||||
|
||||
## Orchestrator validation
|
||||
|
||||
Commands used the repository's original default parallelism and locked dependencies:
|
||||
|
||||
- Root `cargo check --locked`: pass.
|
||||
- Assignment tracking library suite: 28 pass, including public answer source/replay/CAS/reassignment and page/cursor authorization semantics.
|
||||
- DB execution regressions: 36 pass (the 33 approved upstream tests plus 3 new public caller tests).
|
||||
- Complete `yoi-workspace-server --all-targets`: library 1007 pass / 0 fail / 1 pre-existing ignored; binary 11 pass. Library completed in 189.81 seconds.
|
||||
- `workdir --all-targets`: 153 pass; with `http-client`: 156 pass.
|
||||
- Root format check and staged/unstaged diff checks: pass.
|
||||
|
||||
New public-caller tests use the real generated Browser handlers on a current-thread Tokio runtime, explicit isolated finite executor budgets, and a deterministic actual owner/connection hold. After job admission, independent control and timer progress, cancellation leaves the queued slot occupied, overload is typed HTTP 503, drain waits for actual completion, and subsequent normal lookup has reusable capacity. They do not claim successful answer commit or Runtime E2E delivery; the existing domain and real SQLite regressions cover those distinct boundaries.
|
||||
|
||||
Causal red/green: replacing only the three new adapters with their standalone T743 synchronous bodies made all 3 new tests fail after the bounded 5-second watchdog released the held connection; restoring the finite adapters made all 3 pass. Both logs remain in the integration Workdir's `target/t748-integration-public-boundary{,-red}.log`. Complete suite, DB, and Workdir logs use the same `target/t748-integration-*` prefix. An initial Workdir command used the nonexistent package name `yoi-workdir` and failed selection before running tests; the correct Cargo package is `workdir`, as subsequently validated. No failed test was retried to pick a green result.
|
||||
|
||||
## Review and integration status at publication
|
||||
|
||||
This is an Orchestrator-authored candidate for exact-source independent review, not a claim that prior T748 approval covers this new composition. The stable `work/T-748-orchestrator-composition` ref publishes the merge candidate without updating develop. The existing assigned T748 Coder receives it for a normal merge into the same immutable MR source selector and owns the trusted Reviewer/fix loop. Only the Orchestrator will update develop after fresh exact-source readiness. No replacement MR, new Reviewer Runtime Worker, target integration, live deployment, Ticket conclusion, or resource cleanup is claimed here.
|
||||
@@ -0,0 +1,49 @@
|
||||
# Internal SubWorker follow-up observation gap
|
||||
|
||||
## Observed barrier
|
||||
|
||||
During T748's read-only caller inventory, the parent could read the first Runtime
|
||||
inventory assistant result by stable entry ref
|
||||
`E01a12e76-3893-70a0-bb73-28ee0c52f87b`. It then sent a follow-up to the same
|
||||
Idle direct child, `t748-runtime-caller-inventory`, to close four remaining
|
||||
execution/ownership boundaries.
|
||||
|
||||
After a turn-ended/Idle notification, `WorkerList` confirmed Idle, but bounded
|
||||
`SearchSessionEntries` for assistant entries after follow-up user ref
|
||||
`E01a12e76-d696-73d3-80d7-b8cde9935b37` returned no entries. Tool observations
|
||||
were visible. The overview showed only the initial and first follow-up user
|
||||
anchors, not a final result. A single additional Submit asking for the existing
|
||||
findings (not re-investigation) returned success. After its turn-ended/Idle
|
||||
notification, the same bounded assistant query still returned no entries, and the
|
||||
overview still ended at the first follow-up user anchor.
|
||||
|
||||
This is an observation-surface symptom, **not proof** that an assistant result
|
||||
was generated, lost, or that the underlying investigation completed. No raw
|
||||
session storage or hidden worker state was read to bypass the projection.
|
||||
|
||||
The same symptom also occurred for `t748-domain-caller-inventory`: its first
|
||||
result `E01a12e73-7ae4-7f02-9a7e-203140971635` was readable, but after the
|
||||
follow-up turn-ended/Idle notification the overview ended at the follow-up's
|
||||
starting commentary `E01a12e75-9c19-7bd0-9284-299116a05761` and intervening tool
|
||||
records. No final follow-up result was visible. The parent released that
|
||||
read-only delegation without another Submit and took over the remaining generated
|
||||
adapter/forwarder and launch lower-edge checks. Neither `WorkerStop` tool outcome
|
||||
was treated as evidence that the investigation completed.
|
||||
|
||||
## Handling
|
||||
|
||||
The parent did not mark the delegated work or Ticket complete, publish source,
|
||||
or replace independent review with the notification. It stopped only the two
|
||||
parent-owned read-only children to release delegation and took over the open
|
||||
Runtime and domain boundaries. No live product process, parent Worker, target
|
||||
branch, or attachment was stopped or cleaned.
|
||||
|
||||
## Improvement proposal
|
||||
|
||||
Expose enough committed turn metadata through the authorized observation surface
|
||||
to distinguish a finalized assistant result, a turn ending without a result, and
|
||||
an observation capture not yet including an accepted Submit. An explicit
|
||||
completion marker tied to the visible Submit entry would prevent an Idle
|
||||
notification from being confused with inspectable evidence. Preserve append-only
|
||||
session entries and the current authorization projection; do not expose raw
|
||||
prompts/reasoning or require polling/retry loops as a workaround.
|
||||
@@ -0,0 +1,69 @@
|
||||
# Compaction summary input validation (T-738)
|
||||
|
||||
## Baseline and scope
|
||||
|
||||
Implementation starts at `6a12b6cc346402b7a10208685038967171b09cb3`.
|
||||
Compared with the Ticket's inspected `3263d501`, the compaction input, capture and
|
||||
prompt contracts are unchanged; intervening Worker edits concern state-contract
|
||||
naming, resource/manage-worker projections, and shared state. The defects reported
|
||||
against `3263d501` therefore still apply to this checkout.
|
||||
|
||||
The change fixes mandatory previous-summary transport and the continuity policy.
|
||||
It does not add Journal integration (T-745), a separate directive ledger, exploration
|
||||
of historical Segments, or a comprehensive internal-compactor audit log. See
|
||||
[the current design](../design/compaction.md) for the input and retention contracts.
|
||||
|
||||
## Acceptance evidence
|
||||
|
||||
| Ticket condition | Deterministic evidence |
|
||||
| --- | --- |
|
||||
| 1: full initial input, long summary and recent activity | `full_initial_summary_survives_small_overview_budgets_and_both_retention_extremes` observes the actual first compactor `LlmClient::Request`; full body equality, one occurrence, and no clipped duplicate in overview. Summary exceeds 4,000 characters with directives/end sentinel after the long prefix, plus 80 recent messages. |
|
||||
| 2: small target/warning/fallback, context accounting, hard failure | Same matrix uses target=1 and warning/deadline settings 0/1. `inherited_summary_counts_against_hard_input_limit_and_failure_does_not_activate` compares the same overview with/without a mandatory summary above the cap: no compactor request, no replacement Segment, unchanged active metadata/history on rejection. `budget_warning_is_durable_and_keeps_full_summary_in_first_model_request` verifies the warning survives in the next request. Interceptor tests cover request-shape estimation, measured occupancy without double counting, and a warning that cannot fit. |
|
||||
| 3: absent summary, restore, retained boundary, other derived context | Matrix covers no retained tail and retaining all ordinary items. `pasted_markers_and_other_derived_context_remain_ordinary_overview_material` covers absent summary, auto-read, TaskStore, ordinary system, user paste and later derived markers. `restored_legacy_summary_requires_compacted_lineage_first_position_origin_role_and_marker` covers the exact adopted old Host seed boundary and its counterexamples. Invalid or duplicate typed Host summaries fail closed. |
|
||||
| 4: privacy and lightweight overview | Existing tool-argument/tool-result/reasoning omission tests remain. `host_summary_remains_private_to_compaction_not_observation_or_memory_evidence` verifies overview, search, read, and evidence exclude Host summary, other derived/system and reasoning bodies. The persisted retained-history paging fixture includes the new Host summary origin and still excludes derived content. Public provenance maps to the existing excluded `DerivedSummary` class; no public observation/Memory capability is added. |
|
||||
| 5: prompt and shortening policy | Resource policy test covers initial summary, segment user messages, prohibitions, completion conditions, changes/retractions, uncertainty, TaskStore distinction and retained tail. Shrink-policy and budget-warning tests cover the corresponding priorities. Output-hard-max integration test exercises the actual rewrite path and explicit failure if output remains oversized. |
|
||||
| 6: at least three chained compacts | `three_chained_compactions_transport_each_complete_predecessor_without_retaining_old_summaries` starts with a long summary carrying a late original-goal sentinel; each of three compacts receives a full predecessor and a new user directive containing temporary recovery/SubWorker collection instructions. It checks each actual initial request, one current typed summary, predecessor lineage and persisted result. |
|
||||
| 7: tests/check/format and current design | Commands below pass; design input, privacy, retention, limit and assessment descriptions are updated. |
|
||||
|
||||
## Executed validation
|
||||
|
||||
During implementation, the smallest filters were run first:
|
||||
|
||||
- `cargo test -p worker --lib build_summary_prompt_tests::overview`
|
||||
- `cargo test -p worker --lib compact_worker_`
|
||||
- `cargo test -p worker --lib session_history::`
|
||||
- `cargo test -p worker --lib session_capture::`
|
||||
- `cargo test -p worker --lib build_summary_prompt_tests::compact_prompt_and_shrink`
|
||||
- `cargo test -p worker --lib malformed_or_duplicate_host`
|
||||
- `cargo test -p worker --test compact_events_test inherited_summary_counts_against_hard_input_limit_and_failure_does_not_activate`
|
||||
- `cargo test -p worker --test compact_events_test` (25 tests)
|
||||
- `cargo test -p session-store --lib retained_history_pages_twelve_turns`
|
||||
|
||||
Final default-configuration validation:
|
||||
|
||||
- `cargo check` at workspace root (normal compile closure, including TUI/Server)
|
||||
- `cargo test -p worker` (library, integration targets, doctests)
|
||||
- `cargo test -p session-store` (library, integration targets, doctests)
|
||||
- `cargo fmt --all -- --check`
|
||||
- `git diff --check HEAD`
|
||||
- `env -u LD_LIBRARY_PATH deno run --allow-read --allow-run=git tools/check-state-contract-names.ts` (0 unapproved, 0 stale exceptions)
|
||||
|
||||
No added contract depends on an optional Worker feature. Full-workspace tests,
|
||||
`--all-targets`, live provider calls, E2E, Nix and Docker builds were not run.
|
||||
|
||||
## Unverified semantic and operational behavior
|
||||
|
||||
Predetermined mock `write_summary` results prove transport, input policy and
|
||||
replacement behavior, **not** a real model's semantic retention or comprehension.
|
||||
Live semantic evaluation remains pending: use a real model across at least three
|
||||
compacts, score original scope/prohibitions/completion/exception-reporting duties
|
||||
and explicit subsequent changes separately from transport success, and verify that
|
||||
temporary recovery procedures do not displace the continuing request. Do not credit
|
||||
an echo fixture as semantic evidence.
|
||||
|
||||
The restore fixture exercises public `rewind_to` and the shared typed restoration
|
||||
path over persisted annotated records. It is not a cold Runtime restart test.
|
||||
Manual and automatic compaction use the same `compact_impl`; existing automatic
|
||||
resume tests pass, but no separate live automatic-compaction semantic evaluation
|
||||
was run. Initial context accounting is an estimate, not exact provider tokenization;
|
||||
provider failure must still fail the run without activation.
|
||||
@@ -0,0 +1,49 @@
|
||||
# T-740: composition with develop 71ab4c06
|
||||
|
||||
## Source reconciliation
|
||||
|
||||
The existing `work/T-740-workspace-ticket-tags` source at `e9397fa0` was clean. The requested develop commit `71ab4c06b9ae24ca4daa88516d1e436c5a31c779` was fetched and merged normally into this same branch (no replacement MR or integration branch). Generated conflicts in OpenAPI and companion/repository/runtime/ticket/worker-launch types were resolved by regeneration, not by selecting one side's contract. Workdir types were regenerated as well because the shared contract digest changed.
|
||||
|
||||
The merged Rust contract retains both classification operations/projections and the develop Runtime binding/per-request authentication model. Workspace schema remains 90; Ticket classification schema remains 8. The Runtime migration archives historical verification metadata, does not make it a grant, and does not rebuild Ticket/tag tables. Shared server/store/schema-equivalence/purge inventory changes were inspected against develop: both Runtime archives and all three classification tables are included.
|
||||
|
||||
Official generators rerun:
|
||||
|
||||
- canonical `export_openapi`;
|
||||
- repository/runtime/ticket/workdir/worker-launch/companion OpenAPI schema-closure generators;
|
||||
- feature-gated memory/skill/auth/repository-access/Drive/legacy Server type catalogs. Their checked-in representation conventions are preserved (auth uses the raw normalized generator output, not Deno reformatting).
|
||||
|
||||
## Composition defect fixed
|
||||
|
||||
New signed-Runtime router tests found that classification handlers discarded the verified Runtime Worker identity when optional transport source-hint headers were absent. This produced empty attribution in durable tag receipts and allowed another authenticated Worker to replay the same operation key.
|
||||
|
||||
Classification now takes the verified Runtime source from `ServerRequestContext`, retains the existing source-hint verification path, rejects mismatched identities, and carries the actual Worker identity into event/audit and exact-replay input. Runtime-only claims without a Worker identity cannot impersonate a human classification actor. Request proof tokens are not operation identity; exact replay with a new valid signature from the same Worker is accepted, while another Worker conflicts. Other Ticket operation contracts are not respecified by this correction.
|
||||
|
||||
## Executed validation
|
||||
|
||||
All fixtures are hermetic, temporary, in-process boundaries following `docs/development/rust-testing-strategy.md`.
|
||||
|
||||
- `cargo test -p yoi-workspace-server --lib ticket_tags_tests`: 6 passed (original 3 plus signed Runtime lifecycle/replay, identity-bound replay, and rejection matrix).
|
||||
- Rejection coverage: unsigned hints, forged signing key, unknown Worker, other Workspace claim, body tampering, stale pinned key, and administratively revoked binding, for both catalog mutation and Ticket membership endpoints; no rejected-operation writes or execution effects.
|
||||
- `current_workspace90_without_classification_upgrades_ticket7_without_rewriting_ticket_history`: passed. A current Workspace-90/pre-classification Ticket-7 fixture upgrades to Ticket-8 without rewriting an existing closed Ticket, labels, decision/history, or Workspace auth schema; arbitrary `ready` classification preserves the decision.
|
||||
- `workspace89_to90_runtime_rebuild_preserves_tag_links_tombstones_receipts_and_audit`: passed. Real retained migration plus tagged data preserves exact current links, tombstones/recreated identities, receipt/context/audit rows and thread snapshots; replay and FK/deleted-reference rejection remain intact.
|
||||
- `fresh_and_upgraded_state_contract_schemas_enforce_the_same_constraints`: passed, including classification tables and Runtime archives.
|
||||
- `cargo test -p ticket --lib tags`: 14 passed.
|
||||
- `cargo test -p worker --lib feature::builtin::ticket::tags`: 7 passed, covering normal tools/native WIP, permission, route binding and durable mutation/replay contracts after composition.
|
||||
- `cargo test -p worker-runtime --lib workspace_issuer`: 12 passed.
|
||||
- Full `cargo test -p ticket -p server-api -p client -p worker -p yoi-workspace-server`: passed including integration/doc targets. Unit suites: client 57, server-api 92, ticket 120, worker 975, Server 830 passed/1 existing ignored. The compaction integration target's 25 tests also passed.
|
||||
- `cargo test -p server-api --features typescript`: 101 passed; all feature-catalog artifact tests passed.
|
||||
- Root `cargo check`: passed, including normal TUI/Server closure.
|
||||
- Canonical OpenAPI and all six OpenAPI-based generator `--check` runs: passed.
|
||||
- `cargo fmt --all -- --check`, `git diff --check HEAD`: passed.
|
||||
|
||||
Initial signed-source tests failed on attribution/replay and passed after the fix. An attempted Deno format of auth catalog output failed its exact generated-artifact test; regenerating it in the documented raw form restored the artifact and all 101 feature tests passed.
|
||||
|
||||
## Naming audit limitation inherited from target
|
||||
|
||||
The required state-contract-name command was executed. It reports **30 unapproved lines and 9 stale exception hashes** in develop's frozen SSH migration/fixtures, migration-entrypoint fixture and timestamp-mismatch report. Every affected file and the exception inventory are byte-for-byte unchanged from `71ab4c06` (`git diff --exit-code 71ab4c06 -- <affected paths>` passed). The T-740 integration additions introduce no such finding. The inventory was not expanded, hashes were not silently refreshed, and no upstream historical contracts were renamed merely to make the checker green. This audit is **not reported as passing** and remains an Orchestrator/user follow-up outside the classification correction.
|
||||
|
||||
## Limits / handoff
|
||||
|
||||
T-739 is not integrated: its future case-state/close/migration composition is **not verified** by these tests. T-743 final Web UI, live production DB migration and full end-to-end UI/Runtime execution are not claimed. The existing ignored Server Drive Web-adapter roundtrip was not executed. The current-DB upgrade test covers a seeded schema-90 fixture, not live user data.
|
||||
|
||||
Only the existing source branch is to be published non-force. Source movement requires fresh trusted review on the same explicit MR `01a126a0-b4b1-7a13-ba61-5b2c06a3bca4` and current Ticket digest. Target publication, MR integration and Ticket completion/close are not performed here.
|
||||
@@ -0,0 +1,9 @@
|
||||
# T-740: delegated cwd and attachment coordinates
|
||||
|
||||
During T-740, two implementation children were spawned with a read rule for `.` and narrow write rules, plus `cwd: crates/ticket` or `cwd: crates/server-api`. Their committed sessions reported only the narrow crate attachment accessible; `docs/development/rust-testing-strategy.md` and, for the API child, the delegated client/Worker files were inaccessible. The API child correctly stopped rather than trying to bypass the denial. Its partial API changes were inspected and retained.
|
||||
|
||||
The parent had already read the test-design policy and reviewed the delegated tests against it. Remaining client/Worker work was assigned to a new child with `cwd: .`; that child could read the policy and implement its delegated targets. Parent integration and tests verified the actual checkout, not only child summaries.
|
||||
|
||||
This observation does not establish the provider's internal cause. The public `SubWorkerSpawn` description says cwd selects tool working directory, not Workdir/Profile/memory/Ticket roots or additional authority. Narrow cwd plus wider read/delegation rules should have predictable attachment coordinates, or the tool should report that only a restricted attachment can be provided before work starts. An early capability/attachment summary would avoid partial implementations and make mandatory policy-document access verifiable.
|
||||
|
||||
No authority workaround, process stop of the running host, or change to the control-plane tooling is included in T-740.
|
||||
@@ -0,0 +1,50 @@
|
||||
# T-740 implementation and validation
|
||||
|
||||
## Result
|
||||
|
||||
Classification foundation is implemented independently of case-state migration and the final Web UI. Contract/design and T-739/T-743 integration notes: `docs/design/workspace-ticket-tags.md`.
|
||||
|
||||
Changed boundaries:
|
||||
|
||||
- `ticket`: stable Workspace tag identity, normalized display-name uniqueness, tag catalog mutation/list, transactional multi-membership replacement, observation comparisons, identity-bound exact receipts, historical snapshots, schema v8 migration/verification, and projections.
|
||||
- `server-api` / `client`: typed scoped routes and client methods, list/detail/query tag fields, AND/OR/NOT ID filters, OpenAPI and browser type generation.
|
||||
- `workspace-server`: generated route registration, authenticated source attribution, SQL filtering before bounded candidate scans, authoritative projection recheck, suppression of execution/routing notifications, retained pre-classification schema verification and fixture correction, Workspace deletion purge inventory.
|
||||
- `worker`: normal classification tools, native collection/item WIP operations, query filters, current identities/observation keys, and historical before/after snapshots in model-visible tag-change events.
|
||||
|
||||
## Executed checks
|
||||
|
||||
Tests were designed against `docs/development/rust-testing-strategy.md`. Narrow development checks included:
|
||||
|
||||
- `cargo test -p ticket --lib tags`: 14 tag authority tests passed, including name policy, duplicate/foreign/deleted references, stale observation, exact/incorrect replay, changed actor, assignment-context changes, multi-attach/remove, rollback, concurrent delete/attach and replay, no-op audit semantics, bounded lists/sets, and control-word tags across all existing states.
|
||||
- `cargo test -p server-api --lib ticket_tag`: 4 passed; with `--features typescript`, 5 passed.
|
||||
- `cargo test -p worker --lib feature::builtin::ticket::tags`: 7 passed, covering model-visible schemas, permission/authority errors, scoped HTTP operations and WIP binding.
|
||||
- `cargo test -p worker --lib ticket_tag_history_projection`: passed.
|
||||
- `cargo test -p yoi-workspace-server --lib ticket_tags_tests`: 3 passed, covering real router mutation/projection/filter, authentication/forged source/other Workspace rejection, actor-bound receipts, no state/content/assignment/grant/execution projection changes, and query pagination/filter-bound cursors.
|
||||
- `cargo test -p yoi-workspace-server --lib fresh_and_upgraded_state_contract_schemas`: passed, including tag tables/constraints.
|
||||
- `cargo test -p yoi-workspace-server --lib schema_v65_migrates`: passed after distinguishing retained intermediate schema from current classification schema.
|
||||
- `cargo test -p yoi-workspace-server --lib explicit_purge_inventory`: passed.
|
||||
|
||||
Full changed-crate command passed:
|
||||
|
||||
```sh
|
||||
cargo test -p ticket -p server-api -p client -p worker -p yoi-workspace-server --quiet
|
||||
```
|
||||
|
||||
Unit suites at that point: client 57, server-api 92, ticket 120, worker 968, workspace-server 814 passed / 1 ignored. All included integration and doc-test targets also passed. Worker was subsequently rerun after adding the historical tag projection test (969 unit tests); its included integration/doc tests passed.
|
||||
|
||||
The one ignored Server test is the existing repositoryless Drive real-Web-adapter roundtrip, unrelated to classification. It was not executed.
|
||||
|
||||
- Root `cargo check`: passed, including normal TUI/Server compile closure.
|
||||
- `cargo test -p server-api --features typescript`: 101 passed; doc tests passed. Existing ts-rs warnings about unsupported serde attributes remain.
|
||||
- Canonical `export_openapi -- --check`: passed.
|
||||
- `generate_repository_openapi_types`, `generate_runtime_api_types`, `generate_ticket_api_types`, `generate_workdir_api_types`, `generate_worker_launch_api_types`, `generate_companion_api_types` with `-- --check`: all passed. Other feature-gated type catalogs are protected by the full server-api TypeScript tests.
|
||||
- `cargo fmt --all -- --check`, `git diff --check HEAD`: passed.
|
||||
- `env -u LD_LIBRARY_PATH deno run --allow-read --allow-run=git tools/check-state-contract-names.ts`: passed, 0 unapproved / 0 stale exceptions; exception inventory unchanged.
|
||||
|
||||
Initial development/full-suite failures concerned in-flight trait implementations, stale generated artifacts, status-code expectations, and a retained schema fixture/intermediate verifier. They were corrected and the commands above rerun; the final changed-crate run had no failures.
|
||||
|
||||
## Not claimed / follow-up
|
||||
|
||||
No final Web tag UI, full browser/TUI/runtime E2E, real-model judgment test, workspace-wide test run, Nix/Docker build, or live production-data migration was performed. T-739 branch integration is not tested here: schema composition and contract regeneration must preserve the catalog, memberships, tombstones, receipts and tag audit/thread events. This branch is independently buildable on the existing Ticket-state model.
|
||||
|
||||
MR publication and trusted independent review are separate handoff evidence. This implementation does not merge the MR or complete/close T-740.
|
||||
@@ -0,0 +1,88 @@
|
||||
> Historical evidence: the user withdrew composition/wait instructions below.
|
||||
> Current standalone correction and fresh validation/review evidence:
|
||||
> `T-743-standalone-correction.md`. The original body is retained, not a T-748 return gate.
|
||||
|
||||
# T-743 → T-748: published domain-helper / caller handoff
|
||||
|
||||
## Source identity and composition
|
||||
|
||||
This is the retained pre-composition caller inventory published with T-743
|
||||
`9b0d42fdbc2920736c3418bb894f26140e962bbc`. Its descriptions of direct callers
|
||||
below identify the work to move, not the current execution placement. The later
|
||||
normal merge, actual DB/Host placement, ten new regressions, full-suite evidence
|
||||
and unresolved upstream review findings are in `T-743-T748-composition.md`.
|
||||
|
||||
This inventory belongs to the T-743 commit carrying this file on `work/T-743-ticket-public-surfaces` (T-742 base `56795fb92cb9def9bcd701bd51d92e99526f8eff`). Its exact published SHA and MR ID are recorded in the Ticket publication handoff. It is not a copy of the unpublished T-748 adapter and is not evidence that async DB execution has been integrated or reviewed.
|
||||
|
||||
Normal-merge the validated public T-748 source into this existing work branch. Keep the MR's source/target selectors. Recheck the concrete new call graph below against the merged implementation; no placeholder executor, second connection authority, transaction split, fresh integration branch or force push is needed.
|
||||
|
||||
## Three added synchronous Store signatures
|
||||
|
||||
Declared in `crates/workspace-server/src/store.rs` on `ControlPlaneStore`, implemented by `SqliteWorkspaceStore`:
|
||||
|
||||
```rust
|
||||
fn page_ticket_assignments(
|
||||
&self,
|
||||
workspace_id: &str,
|
||||
ticket_id: &str,
|
||||
after_assignment_id: Option<&str>,
|
||||
limit: usize,
|
||||
) -> Result<ticket::TicketAssignmentsPage>;
|
||||
|
||||
fn page_ticket_assignment_diagnostics(
|
||||
&self,
|
||||
workspace_id: &str,
|
||||
ticket_id: &str,
|
||||
assignment_id: &str,
|
||||
after_input_event_id: Option<&str>,
|
||||
after_start_operation_id: Option<&str>,
|
||||
limit: usize,
|
||||
) -> Result<server_api::TicketAssignmentDiagnosticsPage>;
|
||||
|
||||
fn answer_ticket_assignment(
|
||||
&self,
|
||||
workspace_id: &str,
|
||||
ticket_id: &str,
|
||||
input: &ticket::TicketAssignmentAnswer,
|
||||
source: &TicketOrchestratorAssignmentSourceContext,
|
||||
actor: &str,
|
||||
) -> Result<ticket::TicketAssignmentAnswerReceipt>;
|
||||
```
|
||||
|
||||
Implementations forward whole calls respectively to `assignment_tracking::assignments_page`, `assignment_delivery::diagnostics_page` and `assignment_tracking::answer`.
|
||||
|
||||
The answer helper owns one IMMEDIATE transaction: `require_assignment_source` (including replay), current actionable delegation admission for a new operation, `ticket::sqlite_answer_ticket_assignment_in_transaction` (full input/source fingerprint, retained receipt replay, observed assignment/event, open-case gate, body event, audit attributes and immutable operation result), then commit. Keep this complete helper inside one accepted DB job. Do not validate/CAS on one side of an await and append/receipt on the other. The two read helpers use their existing connection/snapshot boundaries and bounded cursors; the diagnostics input and start cursors are independent.
|
||||
|
||||
## Added async HTTP callers and surrounding synchronous work
|
||||
|
||||
In `crates/workspace-server/src/server.rs`, `WorkspaceContractService`:
|
||||
|
||||
| Canonical caller | Browser forwarding caller | Whole Store operation |
|
||||
| --- | --- | --- |
|
||||
| `ticket_assignments_page` | `ticket_assignments_page_browser` | `page_ticket_assignments` |
|
||||
| `ticket_assignment_diagnostics` | `ticket_assignment_diagnostics_browser` | `page_ticket_assignment_diagnostics` |
|
||||
| `ticket_assignment_answer` | `ticket_assignment_answer_browser` | `answer_ticket_assignment` |
|
||||
|
||||
Canonical paths are `/workspaces/{workspace_id}/tickets/{ticket_id}/assignment-tracking/assignments`, `/assignment-diagnostics` and `/assignment-answer`; Browser equivalents use `/api/w/{workspace_id}/tickets/{ticket_id}/...`. Browser methods forward to canonical methods, so they must not independently repeat a mutation or transaction.
|
||||
|
||||
All three canonical methods currently call `resolve_workspace_ticket_reference` before their Store method. This uses Ticket authority/backend DB reads, so moving only the final Store method is not enough. The answer path also calls `authenticated_assignment_source`; its Runtime branch checks the registered current Workspace Orchestrator through `find_workspace_orchestrator`, while its Account branch derives actor/source exclusively from authenticated request context. Preserve source authentication and the in-transaction source fence; do not turn request target principal into source authority. Own/cloned workspace/Ticket/query/body/context/actor values must cross the common execution boundary without borrowing request frames.
|
||||
|
||||
After the answer returns committed, the current handler calls `find_workspace_orchestrator` and `dispatch_orchestrator_assignment_attention`. Account for the former's DB-backed projection lookup and the latter's Runtime/network dispatch in T-748's existing stage/lane design. Runtime/network waits must not occupy the sole DB worker. Keep commit-before-publication and durable scan/recovery semantics even if the awaiting HTTP request is cancelled or its response is lost. Do not automatically resubmit an accepted mutation with a new operation key.
|
||||
|
||||
## Query authority extension and all entry paths
|
||||
|
||||
`TicketQueryRequest` adds typed `assigned_principal`, `handling_status` and `closure_reason`. Existing `TicketAuthority::query_tickets(query: TicketQueryRequest) -> Result<TicketQueryResponse>` in `authority.rs` applies current role/principal/handling and current closed-case reason constraints in its SQL candidate query **before** limit/pagination. Query text separately searches retained closure judgments, including after correction/reopen.
|
||||
|
||||
The HTTP call graph remains `WorkspaceContractService::ticket_query` → `scoped_query_tickets` → `api.authority.query_tickets(query)`. Canonical and Browser query routing, including the pre-existing browser GET query adapter, converge on this authority. T-748 must cover the whole authority read/enrichment call, not just the added SQL fragment or only one UI route.
|
||||
|
||||
Normal Tool/WIP read/assign/release/answer calls forward typed `WorkspaceServerOperation` values from `crates/worker/src/worker.rs`, through `crates/worker-runtime/src/worker_source.rs`, to the same canonical HTTP contracts. Added variants are `TicketAssignmentSet`, `TicketAssignmentClear`, `TicketAssignmentsPage`, `TicketAssignmentDiagnostics`, and `TicketAssignmentAnswer`; `QueryTicket` uses the existing typed query transport with the added filters. The set/clear variants expose existing assignment Store authority rather than creating additional new Store helpers. Their existing T-748 execution-boundary changes must be retained when resolving merge conflicts.
|
||||
|
||||
No new Tool-specific DB adapter is needed. Frontend helpers in `ticket-operations.ts`, TicketHandling/Tags and list/Orchestrator loaders are consumers, never replacement authorities.
|
||||
|
||||
## Composition validation
|
||||
|
||||
Existing T-743 proof: full selected Rust crate suites, generated contract checks, Web/component/browser tests and real-Worker notification/processing synchronization. See `T-743-public-surface-validation.md` for commands and explicit limits.
|
||||
|
||||
After T-748 composition, add/run the narrow boundary checks for all three new HTTP operations and query paths under controlled DB lock/admission, queue/job bounds, overload response, stale/source refusal, rollback, accepted-job cancellation and exact replay. Retain cookie Origin and signed Runtime-binding denial tests, assignment source fencing, one-transaction receipt/event tests and canonical/Browser route equivalence. Root check and relevant full changed-crate tests must cover the combined tree. Then publish only the same source branch normally, verify provider SHA equals local HEAD, and request fresh independent review of that exact combined source.
|
||||
|
||||
Current publication is neither final independent approval nor target integration, Ticket/MR completion, live update or cleanup.
|
||||
@@ -0,0 +1,134 @@
|
||||
> Historical evidence: the user withdrew composition/wait instructions below.
|
||||
> Current standalone correction and fresh validation/review evidence:
|
||||
> `T-743-standalone-correction.md`. The original body is retained, not a T-748 return gate.
|
||||
|
||||
# T-743 / T-748 composition: execution-boundary evidence
|
||||
|
||||
## Source and status
|
||||
|
||||
T-743 continues on `work/T-743-ticket-public-surfaces`, MR
|
||||
`01a12d19-b61b-79a2-baca-89241fd3c3d3` → `develop`. The published T-748
|
||||
source `66bb9d0b825d72e20923003b273b787007f3aed8` was normally fetched and
|
||||
merged into that same source branch, without conflicts, replacement selectors,
|
||||
force push, or a copied execution facade. The composition commit carrying this
|
||||
report also connects the added callers below. Its exact published hash is in the
|
||||
Ticket handoff and provider-resolved MR source.
|
||||
|
||||
**This is a validated intermediate composition, not final independent approval.**
|
||||
T-748 MR `01a12d3f-e90c-7b02-9ed9-cf3bd2e822a1` seq3 requests changes on this
|
||||
upstream source. Its two major findings are not fixed by the new assignment
|
||||
caller work: `T748-DB-NETWORK-LANE` (Subjektiv mixed Runtime/DB placement) and
|
||||
`T748-ASYNC-PROTOCOL-SIGNING` (cold protocol observation source signing).
|
||||
That authoritative verdict was checked again after the combined full suite;
|
||||
no newer published upstream source or verdict was present. The T-748 owner was
|
||||
informed through its Ticket of the composition and requested to provide the
|
||||
normally advanced validated fix source. Do not interpret a green suite as proof
|
||||
that those untested boundaries are safe. Normal-merge that fix into this same
|
||||
T-743 source, revalidate, and independently review the exact combined source.
|
||||
|
||||
## Caller placement
|
||||
|
||||
- Canonical and Browser assignment pages and sanitized diagnostics share one
|
||||
implementation. Workspace scope, Ticket reference resolution and each whole
|
||||
synchronous Store read run on the shared bounded DB owner. None is left as a
|
||||
synchronous pre-call on a Tokio request thread.
|
||||
- Typed Ticket query, including principal/handling/current-closure filtering
|
||||
before pagination, retains T-748's whole authority/read/enrichment DB job.
|
||||
The regression holds the **authority's actual candidate connection**, not the
|
||||
separate API Store connection used by only some enrichment paths. This also
|
||||
proves the empty-result path and wrong-principal filters offload correctly.
|
||||
- Account assignment answers derive attribution from Backend-authenticated
|
||||
context inside the owned DB closure. Runtime answers preserve the live current
|
||||
Orchestrator discovery check on the finite Host lane, because Runtime worker
|
||||
lookup can perform remote HTTP. The DB closure derives Runtime attribution
|
||||
without I/O and the unchanged answer helper validates current singleton and
|
||||
live binding **again under its IMMEDIATE write transaction**, including replay.
|
||||
Target principal and request-body prose never supply author authority.
|
||||
- The same answer helper keeps source authority, actionable-assignment gate,
|
||||
assignment/event CAS, full operation fingerprint/replay, body, audit, receipt
|
||||
and commit together. There is no await within that transaction and no automatic
|
||||
mutation retry.
|
||||
- The accepted SQL job admits the existing finite Host attention continuation
|
||||
**after commit and before returning its result**. It inherits the request
|
||||
lifecycle source, owns lookup/Runtime dispatch independently of the waiter and
|
||||
does not wait on Runtime/network on the sole DB worker. A live HTTP waiter
|
||||
observes best-effort notification completion; losing the waiter does not
|
||||
cancel accepted SQL or accepted publication. Rejected Host publication retains
|
||||
the existing saved-input scan/recovery and diagnostic behavior, not rollback
|
||||
or a synthetic successful delivery.
|
||||
- Normal Tools/WIP still converge on the canonical HTTP contracts. No second
|
||||
ledger, query adapter, source authority, read pool or delivery implementation
|
||||
was added. Existing T-748 set/clear/start/delivery boundaries remain intact.
|
||||
|
||||
## New regression proof
|
||||
|
||||
`crates/workspace-server/src/server_assignment_db_execution_tests.rs` contains
|
||||
10 tests on fixture-owned bounded DB/Host owners, temporary databases and explicit
|
||||
observable gates. Parent inspected the child's committed tool output, the actual
|
||||
new test code and then the combined default-parallel suite, rather than treating
|
||||
an end notification as proof. The child's delegated file scope was released.
|
||||
|
||||
The regressions prove:
|
||||
|
||||
1. Assignment/diagnostic read and Ticket reference resolution wait off the
|
||||
current-thread executor on their actual Store connection mutex.
|
||||
2. Typed principal/handling/closure query matrices, including empty results,
|
||||
hold the candidate connection and filter before the page limit.
|
||||
3. A real second SQLite connection's IMMEDIATE writer reaches the answer's owned
|
||||
busy observer while the same Tokio runtime's timer and independent control
|
||||
progress; one transaction preserves the answer/event/audit/receipt.
|
||||
4. Saturated DB admission returns HTTP 503 and does not accept an answer.
|
||||
5. Cancelling an accepted answer waiter retains its actual job slot/lifecycle
|
||||
through SQL and Host publication; body/audit/receipt persist, dispatch is once,
|
||||
and actual cleanup releases all observed leases.
|
||||
6. Successful HTTP answer waits for its admitted publication without occupying
|
||||
the DB worker; an independent DB callback can progress during publication.
|
||||
7. Account and Browser receipt replay, stale CAS, operation mismatch and bad
|
||||
cursor/error mapping retain their domain meanings.
|
||||
8. Real signed non-Orchestrator source and signed proof replay are denied with
|
||||
no answer/receipt; signed current Orchestrator canonical/Browser replay shares
|
||||
one source-bound receipt, and another source cannot replay it.
|
||||
9. Saturated **2-worker/16-queued Host** live-discovery rejects canonical/Browser
|
||||
Runtime answers before SQL admission, without receipt/audit/publication or
|
||||
retained lifecycle, while independent DB callbacks progress. This last test
|
||||
injects authenticated context at generated handlers to isolate discovery
|
||||
admission; the preceding tests exercise actual signed-proof middleware.
|
||||
|
||||
Read/query contention intentionally uses the actual connection mutex; answer
|
||||
contention uses a separate real SQLite writer. Neither is described as a full
|
||||
remote Runtime latency benchmark. No fixed completion sleeps, mutation retry,
|
||||
parallelism reduction, process-global fixture budgets or new ignored tests were
|
||||
introduced. Fixtures drain accepted Host/cleanup jobs, shut down projection
|
||||
producers, then drain DB jobs before ending their original Tokio driver. Owned
|
||||
busy-handler userdata and SQLite locks unregister/release through RAII.
|
||||
|
||||
## Validation on this composition
|
||||
|
||||
- Root `cargo check`: passed, normal default-member compile closure.
|
||||
- `cargo test -p yoi-workspace-server --lib assignment_db_execution_tests`:
|
||||
**10 passed, 0 failed**, 2.63s (child committed output). Parent reran the first
|
||||
nine after separating Runtime discovery and included all ten in the full suite.
|
||||
- `cargo test -p yoi-workspace-server`: original default parallelism,
|
||||
**985 library passed, 0 failed, 1 pre-existing ignored**, 176.60s;
|
||||
**11 binary passed**, doc tests passed. Log:
|
||||
`target/t743-combined-server-suite.log`.
|
||||
- `cargo test -p workdir`: **153 passed** across library/integration targets;
|
||||
`cargo test -p workdir --features http-client`: **156 passed**, doc tests passed.
|
||||
Logs: `target/t743-combined-workdir.log`, `target/t743-combined-workdir-http.log`.
|
||||
- Combined Web check: **0 errors, 0 warnings**; static production build passed
|
||||
with the existing chunk-size advisory. Web tests **613 passed**, components
|
||||
**318 passed**, Chromium Ticket/principal browser tests **7 passed**.
|
||||
Logs: `target/t743-combined-{web-check,web-build,web-tests,components,browser}.log`.
|
||||
The last change is Server execution placement/test code, not a UI change.
|
||||
- All six server-api TypeScript generator `--check` commands passed: ticket,
|
||||
repository OpenAPI, runtime, workdir, Worker launch and companion.
|
||||
- `cargo fmt --all -- --check`, `git diff --check HEAD` and
|
||||
`env -u LD_LIBRARY_PATH deno run --allow-read --allow-run=git tools/check-state-contract-names.ts`
|
||||
passed; naming: **558 matching lines, 0 unapproved, 0 stale exceptions**.
|
||||
|
||||
Earlier T-743 public-surface, five-crate, Prompt/Tool, visual and real-Worker
|
||||
fixture evidence is retained in `T-743-public-surface-validation.md`. Scripted
|
||||
model/loopback browser fixtures do not attest real model judgment or all T-744
|
||||
live paths. Target integration, Ticket/MR conclusion, live update and retained
|
||||
Worker/Workdir cleanup were not performed. Fresh independent combined-source
|
||||
review remains pending the upstream fixes, not silently waived.
|
||||
@@ -0,0 +1,51 @@
|
||||
# T-743 additional assignment Tools / WIP handoff
|
||||
|
||||
This is an additive follow-up to `T-743-prompt-surfaces.md`; that prior report/history is not rewritten. Additional scope follows T-743 thread sequence 6 and the parent request. Read current typed T-743 and inspected the backend child's actual Server DTOs/routes, not just the proposed names.
|
||||
|
||||
## Implemented public surface
|
||||
|
||||
| Normal Tool | Native Ticket item operation | Contract |
|
||||
| --- | --- | --- |
|
||||
| `TicketOrchestratorAssign` | `orchestrator_assign` | Explicit delegation/reissue to target principal; required observed nullable `expected_assignment_id`, stable `operation_id` |
|
||||
| `TicketOrchestratorClear` | `orchestrator_clear` | Explicit release of observed assignment_id with stable operation_id; not Worker lifecycle |
|
||||
| `TicketAssignmentsQuery` | `assignments_query` | Bounded retained Orchestrator rows, after_assignment_id / next_assignment_id |
|
||||
| `TicketAssignmentDiagnostics` | `assignment_diagnostics` | Actual sanitized DTO with separate input/start cursors and unknown/history distinctions |
|
||||
| `TicketAssignmentAnswer` | `assignment_answer` | Same current waiting/inprogress assignment, observed event CAS, stable operation_key, bounded body |
|
||||
|
||||
Reissue is the explicit Assign operation with a new caller-chosen operation identity against the observed old assignment. Exact replay retains the original key, full principal/CAS/input; no tool automatically queries a newer row, rewrites the expected identity or generates a new operation. All descriptions require querying current authority first. Target principal is operation data, never source/actor authority; the tools fix the target role to Orchestrator responsibility, leaving real role/principal/authentication checks in Backend. No worker-start/transfer operation was invented.
|
||||
|
||||
The new endpoints are the actual typed canonical definitions for `assignment-tracking/assignments`, `assignment-diagnostics` and `assignment-answer`. `WorkspaceClient` has no dedicated role-assignment method: the shared typed `WorkspaceServerOperation` forwarding surface was extended in the Worker crate, using actual `server_api` request DTOs and the existing host-bound execution authority. No client-crate extension is needed for these operations, no direct HTTP/storage fallback is used by the tools, and no second assignment/delivery/receipt ledger was introduced.
|
||||
|
||||
`QueryTicket` now accepts the actual typed current `assigned_principal`, `handling_status`, and current closed-case `closure_reason`. Closure reason remains separate from classification tag IDs. New read-only/review surfaces contain retained query and diagnostics, never Assign/clear/answer/self-report mutation. Mutation exposure is additive from the actual manifest authoring/thread/workflow flags; availability is not Backend authorization.
|
||||
|
||||
## Changed paths in this follow-up
|
||||
|
||||
- `crates/worker/src/worker.rs`: shared typed operation forwarding and scalar encoded query transport.
|
||||
- `crates/worker/src/feature/builtin/ticket.rs`: feature inventories, query schema, native operation mappings and registration.
|
||||
- `crates/worker/src/feature/builtin/ticket/assignment_public.rs`: new Tools, schemas, input validation and typed bounded/sanitized response handling.
|
||||
- `crates/worker/src/feature/builtin/ticket/assignment_public/tests.rs`: new boundary/transport/WIP/access/profile fixtures.
|
||||
- `crates/worker/src/prompt/system.rs`: effective actual-profile research return, explicit confirmation wait, same-row answer and generic close fixtures without repository/MR prerequisites; guarded integration fixture remains separate.
|
||||
- `resources/prompts/common/tickets.md`: concrete tool names, query-first/CAS/exact replay/actor boundaries.
|
||||
- `docs/development/ticket-assignment-tracking.md`
|
||||
- `docs/development/ticket-assignment-delivery.md`
|
||||
- `docs/development/work-items.md`
|
||||
- `docs/design/ticket-wip-projection.md`
|
||||
- this new report.
|
||||
|
||||
## Validation evidence
|
||||
|
||||
Passed focused commands:
|
||||
|
||||
- `cargo test -p worker --lib feature::builtin::ticket::`: **57 passed**, including 12 new public assignment/filter tests. These exercise required observed null/CAS, unknown model authority fields, same-input replay forwarding, read/diagnostic cursor encoding and bounds, answer body/identity validation, stale/permission/unknown outcome non-retry, diagnostic content/credential stripping, ordinary/WIP equivalence and route binding, read-only exclusions, and actual resolved builtin manifest access.
|
||||
- `cargo test -p worker --lib prompt::system::tests::effective_`: **5 passed**, including the actual resolved-profile no-repo/no-MR research→waiting+answer→reasoned-close fixture and the independent guarded MR-review fixture.
|
||||
- `cargo test -p worker --lib feature::builtin::orchestration::`: **7 passed**.
|
||||
- `cargo test -p worker --lib feature::builtin::manage_worker::tests::worker_lifecycle_spawn_serializes_ticket_assignment_without_workdirs_or_flow`: **1 passed**. The prior concurrent macro blocker no longer prevented this test.
|
||||
- `cargo test -p worker --test feature_invocation_test`: **13 passed**.
|
||||
- Root `cargo check`: passed at the observed combined snapshot, including Runtime, TUI and Server compile closure.
|
||||
- Direct delegated-file `rustfmt --check`, `git diff --check HEAD`, and naming check: passed (`558 matching lines; 0 unapproved; 0 stale exceptions`).
|
||||
|
||||
Root `cargo fmt --all -- --check` was **not clean** at the latest observation: non-delegated concurrent edits still needed formatting in `crates/worker-runtime/src/worker_source.rs` and `crates/workspace-server/src/authority.rs`. No outside-scope formatting write was performed. Parent owns the final combined formatting/validation pass.
|
||||
|
||||
## Limits and return
|
||||
|
||||
Transport/schema fixtures use a recording host-bound Workspace adapter; they prove concrete tool wiring, boundary input, permissions and non-retry behavior, not fresh signed Runtime→Server→DB→notification end-to-end execution or model judgment. Backend child's actual persistence/source-fence tests, generated contract synchronization, UI/browser/visual validation, all-Worker/full-stack tests, final combined acceptance and environment rollout remain parent-owned/separate. New API source definitions and one successful root compile are not whole-Ticket satisfaction evidence. No T-743 completion, review request, commits, pushes, merge, Worker stop or backend ledger implementation was performed.
|
||||
@@ -0,0 +1,64 @@
|
||||
# T-743 delegated Prompt / Profile / Flow / Worker handoff
|
||||
|
||||
## Boundaries
|
||||
|
||||
Base: `56795fb92cb9def9bcd701bd51d92e99526f8eff`, branch `work/T-743-ticket-public-surfaces`. Read typed T-743, O-19 and T-739–T-742, assignment tracking/delivery docs, generated OpenAPI and the Rust testing strategy before tests. This report covers only delegated resources/docs/Worker changes, not the parent's UI/Server/API work. No backend ledger, commits, pushes, merge, review request or Ticket conclusion was performed. Existing reports and history were not rewritten. Two historical design documents received only a supersession notice above their preserved original content.
|
||||
|
||||
## Changes
|
||||
|
||||
- Remove ready/intake-ready/Queue from normal Worker Ticket catalogs and native WIP mappings, including all-capability configurations. Remove obsolete queue-response observation invalidation; preserve inverse relation invalidation. Internal trait adapters are not new public operations.
|
||||
- Align common/role/panel instructions: cases open/closed; stable classification IDs and actual tag/set CAS; assignment waiting/inprogress/done is self-report, independent of Worker/MR/delivery/acceptance/work release.
|
||||
- Answers during waiting/ongoing handling continue the same assignment; explicit done reissue creates a new row even for the same principal and preserves old results. Reopen and Worker exchange alone are not reissue. Done/close do not require unassignment.
|
||||
- Explain full-input operation identity/replay, observed assignment/event CAS, stale reread/reconciliation and unknown outcomes without automatic fresh-operation retry. Distinguish saved Assign from failed delivery. Supply observed `orchestrator_assignment_id` for Orchestrator starts, including generic spawn/existing-Worker assignment.
|
||||
- Preserve explicit user approval conditions and guarded trusted review for MR integration, without a universal MR/human approval gate on generic closure. Flow terminal handoff is not case closure, handling done, work release or Worker stop.
|
||||
- Add catalog exclusion and effective prompt/schema fixtures for research return, confirmation wait and reasoned closure. These are scripted instruction/schema checks, not model judgment or full-stack behavior tests.
|
||||
|
||||
## Delegated diff paths
|
||||
|
||||
Worker:
|
||||
- `crates/worker/src/feature/builtin/ticket.rs`
|
||||
- `crates/worker/src/feature/builtin/ticket/assignment_tracking.rs`
|
||||
- `crates/worker/src/prompt/system.rs`
|
||||
|
||||
Resources:
|
||||
- `resources/flows/coder-review.dcdl`
|
||||
- `resources/profiles/intake.dcdl`
|
||||
- `resources/profiles/orchestrator.dcdl`
|
||||
- `resources/prompts/common/tickets.md`
|
||||
- `resources/prompts/panel/orchestrator_idle_queue_notice.md`
|
||||
- `resources/prompts/role/coder.md`
|
||||
- `resources/prompts/role/intake.md`
|
||||
- `resources/prompts/role/orchestrator.md`
|
||||
- `resources/prompts/role/ticket-worker.md`
|
||||
|
||||
Current docs / historical-status notices:
|
||||
- `docs/development/work-items.md`
|
||||
- `docs/development/ticket-assignment-delivery.md`
|
||||
- `docs/design/ticket-wip-projection.md`
|
||||
- `docs/design/merge-request-wip-projection.md`
|
||||
- `docs/design/ticket-evidence.md`
|
||||
- `docs/design/flow-state-graph.md`
|
||||
- `docs/design/workspace-kanban-orchestrator-runtime.md` (notice only)
|
||||
- `docs/design/orchestrator-worktree-layout.md` (notice only)
|
||||
- this new report
|
||||
|
||||
## Focused validation evidence
|
||||
|
||||
Passed:
|
||||
- `cargo test -p worker --lib prompt::system::tests::effective_`: 5 tests (including new return/wait/close schema fixture).
|
||||
- `cargo test -p worker --lib feature::builtin::ticket::`: 45 tests, including normal/WIP retirement, case CAS, tag schemas/transport, assignment tracking and relation observation tests.
|
||||
- `cargo test -p worker --lib feature::builtin::orchestration::`: 7 tests, including observed delegation forwarding and resource/Profile boundaries.
|
||||
- `cargo test -p manifest --lib builtin_profile::tests::`: 4 tests.
|
||||
- `cargo test -p manifest --lib profile::tests::builtin_orchestrator_keeps_cleanup_tool_providers_enabled`: 1 test.
|
||||
- `cargo test -p flow --lib builtin::tests::`: 2 tests; built-in recipe compiles and keeps current selector review contracts.
|
||||
- Root `cargo check`, `cargo fmt --all -- --check`, `git diff --check HEAD`, and naming check (`558 matching lines; 0 unapproved; 0 stale exceptions`) passed at an earlier snapshot before subsequent concurrent Server/API edits. Worker files were formatted again after the final fixture addition; diff check also passed afterward.
|
||||
|
||||
One subsequent Worker spawn-contract invocation was blocked before test execution by a concurrent parent-owned API edit: `crates/server-api/src/lib.rs:3208` (`ticket_assignments_page`) used `#[context] context: ServerRequestContext`; the API macro requires `#[path]`, `#[query]`, `#[header]`, `#[body]`, `#[binary]` or `#[extension]` and rejected it. Command: `cargo test -p worker --lib feature::builtin::manage_worker::tests::worker_lifecycle_spawn_serializes_ticket_assignment_without_workdirs_or_flow`. No test result or final combined-tree compile success is claimed for that invocation. Parent must revalidate its current API/combined tree.
|
||||
|
||||
## Concrete API / runtime limits
|
||||
|
||||
At base `56795fb9`, generated `openapi/server-api.json` has assignment tracking/history and start fences but no assignment-delivery query/receipt HTTP endpoint. `list_pending_ticket_assignment_deliveries` is an internal Store method, not a browser or normal Tool/WIP route. Normal Worker/WIP Ticket inventories also have no Orchestrator Assign/reissue/clear operation; this change removes obsolete Queue rather than fabricating a replacement operation or ledger. The parent owns any public endpoint/Tool handoff needed to satisfy the whole Ticket. Instructions explicitly require reporting unavailable typed operations and forbid inferring delivery/acceptance from status or Worker state.
|
||||
|
||||
The granted live typed Ticket tools still returned legacy six-state projections for the requested reads; those reads established requirements/history, not evidence that the running environment has adopted the repository's new API. No environment update occurred.
|
||||
|
||||
Not run/claimed: whole Worker test suite, Web/browser/visual validation, generated-contract regeneration/check, live migration, model judgment evaluation, full-stack E2E, final combined-tree root compile after concurrent API changes, or T-748 DB-boundary validation. Parent's concurrent Ticket/Server/API/Web changes are excluded from this implementation's evidence.
|
||||
@@ -0,0 +1,62 @@
|
||||
> Historical evidence: the user withdrew composition/wait instructions below.
|
||||
> Current standalone correction and fresh validation/review evidence:
|
||||
> `T-743-standalone-correction.md`. The original body is retained, not a T-748 return gate.
|
||||
|
||||
# T-743 public surfaces: combined implementation and validation
|
||||
|
||||
## Snapshot and scope
|
||||
|
||||
Work branch: `work/T-743-ticket-public-surfaces`, based on T-742's `56795fb92cb9def9bcd701bd51d92e99526f8eff`. This is implementation evidence, not an integration, approval, Ticket conclusion or live-environment update. See the delegated Prompt and Tool reports in this directory for their narrower evidence and earlier blockers; the checks below supersede their earlier compile/format limitations for the combined snapshot.
|
||||
|
||||
The existing Ticket, assignment tracking, assignment delivery and start records remain the authorities. No browser ledger, alternative assignment store or copied DB executor was added.
|
||||
|
||||
## Implemented boundaries
|
||||
|
||||
- Ticket list and detail use open/closed case state, stable classification tag IDs and an independent current responsibility/handling projection. Tags and current/historical closure reasons remain distinct. List filtering for tag IDs, principal, case and current close reason is server-side and preserves cursors; ordinary text search can match retained closure reasons after correction/reopen.
|
||||
- The Orchestrator page reads current assignments with waiting/inprogress/done, reasons, progress, next action and results. Worker liveness, MR evidence, delivery and acceptance do not manufacture a handling status.
|
||||
- Detail supports classification catalog create/list/rename/delete, multiple membership changes, reasoned close/correction/reopen, Assign, observed replacement/reissue, release, retained assignment/result/release history and explicit assignment-fenced answers. Responsibility principal choice uses the real typed user/Worker/Workspace-agent request, not caller authentication data. Backend still validates identities and actual authority.
|
||||
- A saved Assign is not reported as successful delivery or execution. Unknown/stale/permission/unavailable outcomes are distinct. Exact operation snapshots preserve the original key, observed assignment/event or tag set and body; no automatic new delegation is substituted after a lost response.
|
||||
- Pending child operations and observations reset on the Workspace **and** Ticket key, including Workspace changes that retain the same Ticket ID.
|
||||
- Normal Tools/WIP and effective Prompt/Profile/Flow descriptions use Assign as delegation, no ready/Queue prerequisite, same-row continuation answers, explicit new-row reissue and separate case judgment. Retained responsibility and Done are not Worker activity, merge or third-party approval. Historical reports were not rewritten; superseded design descriptions have explicit notices.
|
||||
|
||||
### Canonical API contacts
|
||||
|
||||
Canonical `/workspaces/{workspace_id}/tickets/{ticket_id}` and `/api/w/{workspace_id}/tickets/{ticket_id}` routes expose:
|
||||
|
||||
- GET `assignment-tracking/assignments`: bounded retained rows with assignment-identity pagination.
|
||||
- GET `assignment-diagnostics`: sanitized existing input/delivery/ack/start records, independent input/start cursors, unknown origin/acceptance/actual-processing distinctions; no rendered notification content or binding credentials.
|
||||
- POST `assignment-answer`: authenticated source, observed assignment and handling-event CAS, stable operation-key receipt, body event and audit under one IMMEDIATE transaction. Publication occurs only after the helper returns with its transaction committed. Exact replay retains the receipt; generic history comments do not become unfenced continuing input.
|
||||
- Shared Ticket query principal/handling/current-closure-reason filtering is applied in SQL before paging.
|
||||
|
||||
## Validation
|
||||
|
||||
Passed on the initial T-743 public-surface snapshot (before T-748 composition); later combined execution-boundary evidence is in `T-743-T748-composition.md`:
|
||||
|
||||
- Root `cargo check` (normal TUI/Server compile closure).
|
||||
- `cargo test --no-fail-fast -p ticket -p worker-runtime -p worker -p yoi-workspace-server -p server-api`: all selected crate targets passed. Library counts: server-api 98; ticket 99; worker 994; worker-runtime 417; workspace-server 946 with one existing ignored test. Included integration/binary targets also passed. Log: `target/t743-changed-crates-final.log`.
|
||||
- Focused real-Worker delivery fixture now synchronizes on a canonical `RunCompleted` **after** the latest notification plus final Idle, not the initial Idle window, a fixed sleep or acceptance alone. The original pre-processing Idle failure was reproduced and the focused test plus full Server suite passed after the fix.
|
||||
- Focused manifest builtin-profile (4) and builtin Flow (2) tests passed. Effective research-return, confirmation-wait/same-assignment-answer and separate reasoned-close fixtures are included in the Worker suite.
|
||||
- Web `deno task test`: **613 passed**. Web `deno task test:component`: **318 passed**. Web check: **0 errors, 0 warnings**. Static production build passed (existing chunk-size advisory remains).
|
||||
- `ticket_shell_test.ts` plus `ticket_principal_test.ts`: **7 Chromium browser tests passed**. These exercise repository-free creation, server-filter pagination, known/custom close reasons, same-row answer, new-row reissue, retained results/releases, separate close/reopen, stable tag management, ambiguous saved Assign/exact retry, stale and permission denial, and the case/handling/Worker/MR/empty/error matrix in both themes. The native principal-selector test captures the selected target/observed row and waits on the second actual failed request for retry synchronization. Logs: `target/t743-browser-final.log`.
|
||||
- All six server-api TypeScript generators' `--check` commands passed (ticket, repository, runtime, workdir, Worker launch and companion); generated contract provenance is synchronized with OpenAPI.
|
||||
- `cargo fmt --all -- --check`, `git diff --check HEAD` and `env -u LD_LIBRARY_PATH deno run --allow-read --allow-run=git tools/check-state-contract-names.ts` passed; naming check: **558 matching lines, 0 unapproved, 0 stale exceptions**.
|
||||
|
||||
Earlier validation found and corrected the obsolete TUI queued-notice expectation, two delivery tests expecting ordinary comments to generate new continuing input, and a Home fixture missing the canonical assignment-tracking array. One run also exposed an unchanged Runtime cleanup test's differing walker counts. Its focused invocation and subsequent complete selected-crate run passed; no cleanup implementation fix or claim that this intermittent issue has been eliminated is made.
|
||||
|
||||
## Visual evidence
|
||||
|
||||
Baseline captures: `target/web-ux/t743-baseline-light` and `t743-baseline-dark`. Detail after captures: `t743-after-light` and `t743-after-dark`; actual contact-sheet slices were viewed, not merely generated. Conditions include member/non-owner fixture, Backend action-ineligible controls, 1440/768/390px, light/dark, open+done, open+waiting/stopped Worker, inprogress/running Worker/MR, closed/history, empty, long content and deliberate errors.
|
||||
|
||||
The deliberate query-error route retains its expected HTTP 503/document errors, so the full scenario's exit 2 is not presented as a clean no-error capture. Fixture "anonymous" transport is a synthetic member scenario, not proof of live anonymous authorization.
|
||||
|
||||
Principal-selector captures: `t743-principals-light`/`dark` before a styling correction and `t743-principals-final-light`/`dark` after it. Each final bundle has nine captures (agent/account/Worker choices at all three widths), with no capture errors. The first inspection found cramped native fieldset controls. The fix reuses shared Ticket form styling and removes the redundant fieldset border; final light/dark contact sheets were viewed. Controls, labels and focus remain readable without page overflow.
|
||||
|
||||
List/Orchestrator final evidence: `t743-list-final-reviewed-light` and `t743-list-final-reviewed-dark`, 33 captures each. Parent recovered the child's committed check/build and eight summary-model tests, inspected its final capture metadata (only the intentional query-error route had errors), and viewed actual list/Orchestrator screenshots at desktop/narrow/mobile. The refinements remove repeated offline/count prose, preserve the first mobile case in view and fold close-reason controls separately from classification. Parent verified current diff and browser tests, released the delegated file authority and owns the published handoff. This is observed tool/image evidence, not an invented child review verdict.
|
||||
|
||||
## Explicit remaining work and limits
|
||||
|
||||
The published T-748 source `66bb9d0b825d72e20923003b273b787007f3aed8` has now been normally merged into the same T-743 source and the added callers connected to its existing bounded owner. The answer transaction remains intact; Runtime live discovery and post-commit dispatch use the finite Host lane. Combined full Server/Workdir and ten new boundary regressions pass; see `T-743-T748-composition.md` for exact proof and distinctions. However T-748 MR seq3 has two unresolved major findings on other Subjektiv/network and cold protocol signing paths. A validated upstream fix source, normal composition/revalidation and fresh independent exact combined-source review remain necessary. This is not final approval.
|
||||
|
||||
Current evidence does not attest actual model judgment quality. Prompt/Tool fixtures are scripted inclusion/schema/transport tests; Chromium uses a loopback API fixture. The real-Worker Server fixture uses a scripted model with actual Controller/session/Runtime acceptance and canonical processing synchronization. None is a live migration/rollout, proof of actual processing for every production delivery, or completion of T-744's full real-path validation.
|
||||
|
||||
No target integration, Ticket conclusion, live process update or branch/Workdir cleanup was performed.
|
||||
@@ -0,0 +1,139 @@
|
||||
# T-743 standalone source correction
|
||||
|
||||
## Accepted-plan correction and source boundary
|
||||
|
||||
The user withdrew the instruction to compose/wait for T-748. T-743 owns its
|
||||
public UI/API/Tools/Prompt work and its own independent review/fix loop against
|
||||
the existing develop contracts. Platform composition and target integration are
|
||||
Orchestrator work. T-748 implementation or approval is **not** a T-743 return
|
||||
gate. This does not reduce any T-743 product requirement or authorize ignoring
|
||||
T-743-specific authorization, concurrency or public-operation defects.
|
||||
|
||||
Observed develop is `56795fb92cb9def9bcd701bd51d92e99526f8eff`; a normal fetch
|
||||
confirmed no movement from the original T-743 base. Standalone implementation
|
||||
`9b0d42fdbc2920736c3418bb894f26140e962bbc` adds the required public contracts and
|
||||
semantic tests on that base. Published merge `5c5727e3f8ad85bddebda2672fd245a24317fc5f`
|
||||
had added unrelated T-748 platform and dependent adapters at the withdrawn
|
||||
instruction. Corrective commit `c6d73e82` uses a **normal mainline revert** of that
|
||||
merge, not reset, rebase, force push or a replacement MR.
|
||||
|
||||
Before retaining historical report bodies, the corrective tree was compared and
|
||||
matched `9b0d42fd` exactly. After retaining those reports, `git diff --quiet
|
||||
9b0d42fd -- crates web tools resources openapi` still passed. Thus all source,
|
||||
wire/generated contracts, UI/Tools/Prompt and semantic tests from the initial
|
||||
standalone result survive without changes or weakened assertions.
|
||||
|
||||
Removed only the composition's shared DB/Host/cleanup execution owners, broad
|
||||
async-platform and lifecycle caller changes, Workdir signing adapter, and the
|
||||
new assignment/query execution adapters/test accessors and fixtures requiring
|
||||
that removed owner. No incomplete executor facade or platform API was copied.
|
||||
The baseline's synchronous execution placement is distinguished from T-743
|
||||
product defects; it is not an excuse to overlook a newly introduced defect.
|
||||
The implementation is separable: no T-743 product API, author/source fence or
|
||||
receipt requires a T-748-only type.
|
||||
|
||||
Kept T-743's authenticated source attribution, current singleton/live binding
|
||||
fence including replay, whole IMMEDIATE answer source/CAS/body/audit/receipt/
|
||||
commit transaction, committed-input delivery scan/deduplication, sanitized
|
||||
assignment diagnostics, retained history, typed SQL-before-page filters,
|
||||
canonical/Browser routes and Normal Tools/WIP transport. Kept case/handling/
|
||||
Worker/MR separation, same-assignment answer versus new-row reissue, stable tags
|
||||
and closure history, effective Prompt/Profile/Flow and their original tests.
|
||||
|
||||
## Evidence and review ownership
|
||||
|
||||
Historical report bodies (`T-743-public-surface-validation.md`,
|
||||
`T-743-T748-callers.md`, `T-743-T748-composition.md`), published commits and MR/
|
||||
Ticket events remain evidence of what was done then. Their old composition-wait
|
||||
instructions are superseded, not retroactively rewritten. T-748-specific reports
|
||||
and tests remain readable in the published merge's Git history, but are not
|
||||
current T-743 source contracts. This document carries the current correction and
|
||||
new validation evidence.
|
||||
|
||||
Fresh trusted independent review on MR
|
||||
`01a12d19-b61b-79a2-baca-89241fd3c3d3` judges the actual T-743 Ticket requirements,
|
||||
authorization, concurrency and public operations against the exact normally
|
||||
published corrected source. The review thread should include this correction
|
||||
as an append-only event, not replace its original summary. The Coder tool set
|
||||
has no MR-comment mutation tool; `OpenMergeRequest` on this repository would
|
||||
conflict with the existing MR, not append a comment. The correction is therefore
|
||||
supplied for the trusted review event body, without bypassing typed authority.
|
||||
No target integration, Ticket/MR conclusion, live update or retained Worker/
|
||||
Workdir cleanup is authorized or performed.
|
||||
|
||||
## Revalidation
|
||||
|
||||
These are fresh results on the corrected standalone implementation, not the
|
||||
historical T-748-composed suite. Only report notices/evidence changed afterward;
|
||||
implementation equality with `9b0d42fd` was checked again before publication.
|
||||
|
||||
- Root `cargo check` passed, including normal TUI/Server compile closure; final
|
||||
repeat passed. Logs: `target/t743-standalone-{check,final-check}.log`.
|
||||
- Public assignment/source/replay/filter focused tests: **28 passed**.
|
||||
- `cargo test --no-fail-fast -p ticket -p worker-runtime -p worker -p yoi-workspace-server -p server-api`
|
||||
passed all selected targets with normal default parallelism. Library counts:
|
||||
server-api **98**, ticket **99**, worker **994**, worker-runtime **417**,
|
||||
Server **946** with **1 pre-existing ignored** (176.76s); Server binary **11**,
|
||||
other integration/binary/doc targets passed. Log: `target/t743-standalone-crates.log`.
|
||||
- The full Worker suite includes public Tool/WIP forwarding, source/target
|
||||
distinction, exact-retry and effective research-return/confirmation-wait/
|
||||
separate-close Prompt fixtures. These are scripted semantic tests, not a
|
||||
measurement of real model judgment. Extra `manifest --lib builtin_profile`
|
||||
**6 passed** and `worker --lib flow` **17 passed**. Initial mistyped filters
|
||||
matched zero tests and are not counted as proof.
|
||||
- Fresh Web check **0 errors/0 warnings** and production build passed; existing
|
||||
chunk-size advisory remains. Web **613**, component **318** and Chromium
|
||||
Ticket/principal **7** tests passed. Logs: `target/t743-standalone-{web-check,web-build,web-tests,components,browser}.log`.
|
||||
- All six TypeScript generator `--check` commands passed: ticket, repository
|
||||
OpenAPI, runtime, workdir, Worker launch and companion.
|
||||
- `cargo fmt --all -- --check`, `git diff --check HEAD` and the required
|
||||
`env -u LD_LIBRARY_PATH deno run --allow-read --allow-run=git tools/check-state-contract-names.ts`
|
||||
passed: **558 matching lines, 0 unapproved, 0 stale exceptions**.
|
||||
|
||||
## Recovered visual evidence and parent review
|
||||
|
||||
The visual child was stopped by an interrupted turn, not a successful final
|
||||
handoff. The parent inspected its committed session and recovered six completed
|
||||
capture bundles under `target/t743-standalone-visual`, then personally used
|
||||
`ViewImage` on actual images. No missing child verdict was invented, and no
|
||||
child was restarted just to wait for a report.
|
||||
|
||||
Fresh bundles at source **`c6d73e8286d743e0329154d49b52d4bee53e8d60`**:
|
||||
|
||||
- `c6d73e82-tickets` / `tickets-dark`: **63 captures each**, covering detail,
|
||||
list/create/current closure filtering, Orchestrator, open+done, waiting,
|
||||
running/stopped Worker, repository/MR/no-MR, read-only/eligibility, closed,
|
||||
long, empty, error and unknown states at **1440/768/390**, light/dark.
|
||||
- `c6d73e82-ticket-principals` / `ticket-principals-dark`: **9 each**, explicit
|
||||
agent/account/Worker selection at all three widths.
|
||||
- `c6d73e82-related-light` / `related-dark`: **21 each**, explicitly scrolled
|
||||
capture points for retained result/release history, case history, returned
|
||||
handling, stopped/running Worker, action eligibility and MR separation.
|
||||
This closes the inner-scroll gap: browser full-page capture alone does not
|
||||
expose lower detail sections.
|
||||
|
||||
Total **186** captures. Metadata records the actual source SHA and `dirty:true`
|
||||
for the then-uncommitted report notices, not hidden implementation changes.
|
||||
Parent rechecked the implementation equality, source/viewport/route matrix,
|
||||
per-capture errors and runner-owned fixture shutdown records. Parent actual image
|
||||
review included list desktop/mobile and Orchestrator narrow/mobile, principal
|
||||
light/mobile and dark/desktop sheets, waiting and returned handling, retained
|
||||
result/release mobile and case history narrow, stopped Worker, MR separation,
|
||||
mobile error and long list. Labels/actions remain readable; case state, handling,
|
||||
actual Worker and MR sections remain distinct; no new overflow or visual fix was
|
||||
needed. Original before/after visual evidence remains retained for comparison.
|
||||
|
||||
Both Ticket scenario bundles deliberately exit **2** and are
|
||||
`completed-with-errors`: only the `error` route at the three widths records its
|
||||
fixture query **HTTP503**, console/request-abort and visible error/Retry evidence.
|
||||
The other four bundles exit **0**, and no other route has capture errors. The
|
||||
parent saved the exact error audit in
|
||||
`target/t743-standalone-visual/parent-errors-audit.txt`. Do not describe the whole
|
||||
scenario as error-free or the intentional 503 as a product regression. The
|
||||
synthetic member/anonymous transport is not proof of live anonymous permission;
|
||||
actual cookie Origin/signed Runtime/source denial is exercised by Server tests.
|
||||
|
||||
All reported fixture processes had owner-scoped shutdown before the child was
|
||||
stopped; this is fixture teardown, not live Yoi/retained Worker cleanup. This
|
||||
publication is ready for its own fresh independent T-743 review, not an approval,
|
||||
model-quality attestation, completion of T-744 live paths or target integration.
|
||||
Reference in New Issue
Block a user