Repository navigation
refactor(scheduler): compose TypeScript arbitration with interaction reads - #6634
huangruiteng merged 10 commits into
Conversation
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
Public-head integration validation:
|
| Field | Evidence |
|---|---|
| Canonical owner | Before: Python structural diagnostics and disposition composition, plus native consistency checks. After: work_items/interaction_contract.ts owns the complete arbitration decision and shared consistency kernel. |
| Legacy semantic code deleted | Deleted decision-bearing definitions span 139 lines: _required_bool (12), _classify_disposition (35), build_scheduler_arbitration (92). This includes signatures, docstrings, codecs and transport, not 139 lines of pure rules. Structural diagnostics, precedence and disposition ownership are retired from Python. The separate 2-line _mapping codec deletion is excluded. The old native consistency wire function/handler is also deleted. |
| Bridge code added | Conservative gross 103 added product lines: DTO/facts codec 34; interaction pair/dict wrapper/transport 47; quota wiring 11; explicit hint record consumption 4; snapshot allowlists 2; existing native read wrapper/rename 5. No new method, runtime, dependency or setting. |
| Cross-runtime calls | Actual quota should-run CLI traces: active and human gate required-read/consistency calls 3→2; App monitor chain 12→8; paused/stopped 1→1; invalid execution context 2→2. These are counts for this operation family, not all CLI RPCs. The selected paired construction/hint changes 2→1; additional real callers still construct contracts. |
| Product-code net change | 9 product files, +155/−196 = −41 against the final merge base. Tests, fixtures, configuration and documentation are separate. |
| Migration scaffolding | Native literal decision/diagnostic tables replace the removed Python decision oracle. One test-only adapter uses the real native projection for retained Python hint consumers. It exits when those consumers execute in TypeScript. Differential qualification remains external evidence; production never dual-runs. |
| Facade exit | Scalar/Mapping codecs, the 64 KiB transport probe, Enum/dataclass result adapter and the private pair remain for build_scheduler_hint and five dict-only constructions: three in quota/live_decision.py, recovery in quota/unsettled_host_turn.py, and the cooldown finalizer. Delete them when scheduler cadence/hint and interaction construction run in TypeScript. External Host mutation remains its own adapter. |
| Correctness and performance | Final pinned results and reproducible validation are in the validation comment below. No behavior delta is intended. |
Performance: owner_review_hold — exact public HEAD integration V5
Current V5 SQLite/monitor complete CLI p95 is +8.447648% / +178.672962 ms. It exceeds both the +5% and +25 ms gates. The three other CLI rows pass. All four warm native p95 values are below 2 ms. Current integration disposition and overall performance disposition are both owner_review_hold.
This packet pins PR #6634 at HEAD f8555130aab4ceb3e5dcea35884fa70c6e01b209, with baseline 052f492767a1d893dfb96a9f777331459fd4c5ae. V5 qualifies the public HEAD after common-main integration. The nine measured production files are byte-identical to V4. It is a separate integration run, not a retry to erase the valid V4 miss. V3 and V4 remain recorded below. V5 does not resolve or reclassify their holds.
V5 completed exactly one frozen run, with zero retries. All 48 source/base/wheel/sdist CLI qualification runs, the physical TypeScript mutation check and all 256 complete public/domain comparisons passed. No measured sample was removed. Correctness passing does not satisfy the failed CLI performance gate.
| File/SQLite case | Warm native transaction p95, base -> head (ms) | Complete CLI p95, base -> head (ms) | CLI p95 change | Current V5 gate |
|---|---|---|---|---|
| File active | 1.283278 -> 0.775725 | 687.480170 -> 692.964086 | +0.797684%; +5.483916 ms | Pass |
| File monitor | 1.494543 -> 0.601709 | 828.078621 -> 839.394325 | +1.366501%; +11.315704 ms | Pass |
| SQLite active | 1.716340 -> 1.092049 | 684.077129 -> 648.319723 | -5.227102%; -35.757406 ms | Pass |
| SQLite monitor | 1.674389 -> 0.870583 | 2115.061687 -> 2293.734649 | +8.447648%; +178.672962 ms | Hold: exceeds both gates |
The baseline transaction has two selected native requests; the candidate has one. The full active CLI uses 3 -> 2 selected calls; monitor uses 12 -> 8. Every selected request uses the actual production request scope. Each CLI row uses 64 alternating matched pairs. Cold/warm/burst use 16/128/256 observations per variant and row. Quantiles use nearest rank without trimming. The CLI gate requires both <=5% and <=25 ms; the native gate requires strictly <2 ms. Sample counts, ordering and thresholds are unchanged from V4.
All 512 measured CLI samples have stable native PIDs and zero startup events. The light macro trace retains RPC/wire counts and startup timing, but does not time individual RPCs. The separate pure-helper native measurements cannot causally attribute the full SQLite/monitor CLI miss. No new profiling or measurement was started to explain the result.
All owned managed runtimes and observed processes exited. The V5 protocol SHA256 is 692c76c772fac2c923971fb251d794f3252b726fbcca23bdabf706425d149962; final performance receipt SHA256 is 84c2d021a1ace14837b18593d0fcd6658670207d300e37b6ea3efb777d4e4f4a. The V5 evidence seal SHA256 is 7ea402ab79903ebec2a6ae6b4b478b1bec9da8fbbdeaea38ae4020ed42439e0d. These synthetic Linux checks cover local File/SQLite authority; they do not establish real-model or external automation behavior.
Complete CLI p50 and p95
These are the same fixed 64 paired observations per row. p50 is context; it does not replace or waive the p95 gates above.
| Case | Base p50/p95 ms | Head p50/p95 ms |
|---|---|---|
| file/active | 568.606615/687.480170 | 564.738633/692.964086 |
| file/monitor | 715.771013/828.078621 | 719.828922/839.394325 |
| sqlite/active | 581.386836/684.077129 | 593.837458/648.319723 |
| sqlite/monitor | 1695.738770/2115.061687 | 1641.701351/2293.734649 |
Cold startup, complete projection adapter and daemon memory
Cold figures measure managed-process startup with equal prepared disk compile caches, not cold filesystem or Python startup. Warm adapter figures include the complete affected projection transaction and actual native transport; they exclude provider I/O. Inputs come from the accepted real CLI corpus. Macro CLI measurements exercise the actual provider. RSS/HWM are Linux /proc reports without forced GC.
| Case | Cold startup base p50/p95 ms | Cold startup head p50/p95 ms | Warm adapter base p50/p95 ms | Warm adapter head p50/p95 ms |
|---|---|---|---|---|
| file/active | 236.799/350.448 | 238.494/339.900 | 1.006/1.321 | 0.629/0.838 |
| file/monitor | 238.613/290.945 | 237.425/344.092 | 0.800/1.534 | 0.489/0.682 |
| sqlite/active | 240.555/561.143 | 241.819/374.493 | 1.063/1.770 | 0.616/1.156 |
| sqlite/monitor | 265.726/368.829 | 241.694/290.733 | 0.978/1.714 | 0.603/0.957 |
After 1 s idle, then 256 sequential logical projection transactions per variant (baseline 512 native calls, candidate 256):
| Case/variant | RSS idle→after MiB | HWM idle→after MiB |
|---|---|---|
| file/active base | 103.00→103.05 | 103.00→103.05 |
| file/active head | 102.10→102.12 | 102.10→102.12 |
| file/monitor base | 103.01→103.06 | 103.01→103.06 |
| file/monitor head | 99.81→99.88 | 99.81→99.88 |
| sqlite/active base | 92.88→92.93 | 96.89→96.89 |
| sqlite/active head | 101.34→101.36 | 101.34→101.36 |
| sqlite/monitor base | 93.77→93.82 | 95.88→95.88 |
| sqlite/monitor head | 101.17→101.24 | 101.17→101.24 |
Each source identity, script and valid sample is retained. After V3, the projection changed to avoid small-packet snapshot-sink allocation under a checked output bound. V4 retained one CLI p95 miss. V5 qualifies common-main integration on the public head with no owned implementation change. It is not a replacement sample set for V4. No remaining tail miss has isolated causal attribution.
Machine-readable paired qualification receipts (12 rows, 48 runs)
{
"base": "052f492767a1d893dfb96a9f777331459fd4c5ae",
"head": "f8555130aab4ceb3e5dcea35884fa70c6e01b209",
"fixture_sha256": "8d2914dabb61a710bd3fa0fd8b6543977480a337d39a4d33b5e6d36fc96542df",
"harness_sha256": "4372ce64d7e6df24ab8fb7b94062c54b6c918cc2cb974192138900934d9ec99c",
"entrypoint": "python -m loopx.cli; complete arguments, isolated fixtures and installation steps are below",
"variant_revisions": {
"base": "052f492767a1d893dfb96a9f777331459fd4c5ae",
"head": "f8555130aab4ceb3e5dcea35884fa70c6e01b209",
"wheel": "f8555130aab4ceb3e5dcea35884fa70c6e01b209",
"sdist": "f8555130aab4ceb3e5dcea35884fa70c6e01b209"
},
"artifact_sha256": {
"wheel": "3251b470d149475bedc9b04988222f8b9d84414f8060542f0f59bc821d02e75a",
"sdist": "0b40386e3c03c26b1337ef877669e1668e9425c006779903c7570d017931d820"
},
"comparison": "No domain fields removed. Complete public JSON, canonical revision/Todos/leases and durable domain values/path sets match. Raw bytes retained; differing infrastructure lock PIDs are checked against observed process owners. Fingerprints include local synthetic paths.",
"rows": [
{
"backend": "file",
"scenario": "active",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "8c47bcaee9c7862d3b626b4305a6b6764d5afc7b6f62c637640c3476fe6ed8a4",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "8c47bcaee9c7862d3b626b4305a6b6764d5afc7b6f62c637640c3476fe6ed8a4",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "8c47bcaee9c7862d3b626b4305a6b6764d5afc7b6f62c637640c3476fe6ed8a4",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "8c47bcaee9c7862d3b626b4305a6b6764d5afc7b6f62c637640c3476fe6ed8a4",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "file",
"scenario": "human_gate",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "ddcc37cfbfce7cfdf501fcb033d2ec267a3f35de7fb0df0956ec25baec1e5512",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "ddcc37cfbfce7cfdf501fcb033d2ec267a3f35de7fb0df0956ec25baec1e5512",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "ddcc37cfbfce7cfdf501fcb033d2ec267a3f35de7fb0df0956ec25baec1e5512",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "ddcc37cfbfce7cfdf501fcb033d2ec267a3f35de7fb0df0956ec25baec1e5512",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "file",
"scenario": "monitor",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "af4a746e5dd14cfe3f386931b547e5f562cb13b683bbc88228946a8db949bad6",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "af4a746e5dd14cfe3f386931b547e5f562cb13b683bbc88228946a8db949bad6",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "af4a746e5dd14cfe3f386931b547e5f562cb13b683bbc88228946a8db949bad6",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "af4a746e5dd14cfe3f386931b547e5f562cb13b683bbc88228946a8db949bad6",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "file",
"scenario": "paused",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "420f46ed809efaf045f0ae41c12850fc635f7b90269949641403b49bbd46c435",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "420f46ed809efaf045f0ae41c12850fc635f7b90269949641403b49bbd46c435",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "420f46ed809efaf045f0ae41c12850fc635f7b90269949641403b49bbd46c435",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "420f46ed809efaf045f0ae41c12850fc635f7b90269949641403b49bbd46c435",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "file",
"scenario": "stopped",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "7533dc09e3fc93bd2c07ca0d0e7089421c4edd65bc39a6dad43f28b79745386f",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "7533dc09e3fc93bd2c07ca0d0e7089421c4edd65bc39a6dad43f28b79745386f",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "7533dc09e3fc93bd2c07ca0d0e7089421c4edd65bc39a6dad43f28b79745386f",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "7533dc09e3fc93bd2c07ca0d0e7089421c4edd65bc39a6dad43f28b79745386f",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "file",
"scenario": "invalid_context",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "b50ae26185ffc6e9ebee7f1d096a7c0d19ba0d7d7189556030121c95f5fdc03f",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "b50ae26185ffc6e9ebee7f1d096a7c0d19ba0d7d7189556030121c95f5fdc03f",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "b50ae26185ffc6e9ebee7f1d096a7c0d19ba0d7d7189556030121c95f5fdc03f",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "b50ae26185ffc6e9ebee7f1d096a7c0d19ba0d7d7189556030121c95f5fdc03f",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "sqlite",
"scenario": "active",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "e5a8c8573cccaf1c8e44f47eb1c31fae4225d9e6104080ce05332b18b3e8f8c9",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "e5a8c8573cccaf1c8e44f47eb1c31fae4225d9e6104080ce05332b18b3e8f8c9",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "e5a8c8573cccaf1c8e44f47eb1c31fae4225d9e6104080ce05332b18b3e8f8c9",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "e5a8c8573cccaf1c8e44f47eb1c31fae4225d9e6104080ce05332b18b3e8f8c9",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "sqlite",
"scenario": "human_gate",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "5179523d65ae6bda84669596db72c8616a03ee7d9f2b5c1743d0bdcfcb8760c2",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "5179523d65ae6bda84669596db72c8616a03ee7d9f2b5c1743d0bdcfcb8760c2",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "5179523d65ae6bda84669596db72c8616a03ee7d9f2b5c1743d0bdcfcb8760c2",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "5179523d65ae6bda84669596db72c8616a03ee7d9f2b5c1743d0bdcfcb8760c2",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "sqlite",
"scenario": "monitor",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "f4e7d430ae51f3e293b987ebf9c412994c4dd6a77eebfe78a64709a82e7f3b39",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "f4e7d430ae51f3e293b987ebf9c412994c4dd6a77eebfe78a64709a82e7f3b39",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "f4e7d430ae51f3e293b987ebf9c412994c4dd6a77eebfe78a64709a82e7f3b39",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "f4e7d430ae51f3e293b987ebf9c412994c4dd6a77eebfe78a64709a82e7f3b39",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "sqlite",
"scenario": "paused",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "c0a4f42a774c2b941b2a6df828979b022e2b0076d10cda74ff3fc847ed1ef65c",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "c0a4f42a774c2b941b2a6df828979b022e2b0076d10cda74ff3fc847ed1ef65c",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "c0a4f42a774c2b941b2a6df828979b022e2b0076d10cda74ff3fc847ed1ef65c",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "c0a4f42a774c2b941b2a6df828979b022e2b0076d10cda74ff3fc847ed1ef65c",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "sqlite",
"scenario": "stopped",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "9308a352824db2f2ab104a0b91ce823d1f31e36ab8c8ba81cd171f9efa839605",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "9308a352824db2f2ab104a0b91ce823d1f31e36ab8c8ba81cd171f9efa839605",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "9308a352824db2f2ab104a0b91ce823d1f31e36ab8c8ba81cd171f9efa839605",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "9308a352824db2f2ab104a0b91ce823d1f31e36ab8c8ba81cd171f9efa839605",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
},
{
"backend": "sqlite",
"scenario": "invalid_context",
"variants": {
"base": {
"exit_code": 0,
"public_json_sha256": "1d5a8b1fc3c85d867b34eec932c7a0ae7c10287a1a17a1a5d723f13e3556b46c",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"head": {
"exit_code": 0,
"public_json_sha256": "1d5a8b1fc3c85d867b34eec932c7a0ae7c10287a1a17a1a5d723f13e3556b46c",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"wheel": {
"exit_code": 0,
"public_json_sha256": "1d5a8b1fc3c85d867b34eec932c7a0ae7c10287a1a17a1a5d723f13e3556b46c",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
},
"sdist": {
"exit_code": 0,
"public_json_sha256": "1d5a8b1fc3c85d867b34eec932c7a0ae7c10287a1a17a1a5d723f13e3556b46c",
"domain_and_canonical_values_equal": true,
"verified_runtime_restart": true
}
}
}
]
}Physical mutation sensitivity, executed through the same complete CLI harness:
{
"head": "f8555130aab4ceb3e5dcea35884fa70c6e01b209",
"target": "loopx/control_plane/work_items/interaction_contract.ts",
"old": "if (must_attempt) return [\"active_work\", \"interaction_agent_attempt_required\"];",
"new": "if (must_attempt) return [\"quiet_wait\", \"interaction_agent_attempt_required\"];",
"original_sha256": "d0ca3d492689af99c094cdf0e5ca210cd950299a7578589fe22722f05119bfc6",
"mutant_sha256": "eeeb61d7ceb6c17ae86a03277bf0d195cec84494099a3b3a0e2ab20faa8dcfe3",
"mutation_count": 1,
"shared_worktree_modified": false,
"executed": true,
"exit_status": 1,
"expected_failure": true,
"independent_invariant": "active work requires scheduler action run_now",
"actual_scheduler_action": "backoff_until_state_change",
"native_arbitrations": [
{
"mode": "bounded_delivery",
"errors": [],
"disposition": "quiet_wait",
"reason_code": "interaction_agent_attempt_required"
},
{
"mode": "bounded_delivery",
"errors": [],
"disposition": "quiet_wait",
"reason_code": "interaction_agent_attempt_required"
}
],
"harness_sha256": "4372ce64d7e6df24ab8fb7b94062c54b6c918cc2cb974192138900934d9ec99c"
}Complete reproducible baseline/source/wheel/sdist CLI replay
Replay the complete CLI parity check
This packet uses the same qualification logic for the immutable baseline, the reviewed source, a fresh wheel install, and a fresh sdist install. It compares every public JSON field, canonical provider revision/Todos/leases, durable domain JSON values, and persisted path sets. It keeps the original file bytes. A differing .lock PID must belong to that execution's observed CLI or Node process. No domain field is removed.
Scope: Linux, Python 3.13.12, Node 22.22.3 with SQLite support, local File/SQLite authority. Use an isolated scratch directory without whitespace. The scripts create synthetic Goals and local runtime processes. They disable usage pings. They do not call a model or an external App automation API.
The fixed wall clock applies during seed construction and every CLI call. Monotonic/performance clocks remain real. This packet runs correctness checks, not a timing benchmark.
1. Prepare the pinned worktrees and normal packages
Set REPO_DIR to a local clone of loopx-project/loopx. Use PR_NUMBER=6634. Put the qualified Node binary directory on PATH first.
set -eu
export REPO_DIR=/path/to/loopx-clone
export PR_NUMBER=6634
export BASE_REF=052f492767a1d893dfb96a9f777331459fd4c5ae
export HEAD_REF=f8555130aab4ceb3e5dcea35884fa70c6e01b209
export TEST_REL=tests/control_plane/test_scheduler_arbitration_native_cli.py
export TEST_SHA=8d2914dabb61a710bd3fa0fd8b6543977480a337d39a4d33b5e6d36fc96542df
export TASK_DIR="$(mktemp -d)"
export BASE_DIR="$TASK_DIR/base"
export HEAD_DIR="$TASK_DIR/head"
export REPLAY_DIR="$TASK_DIR/replay"
mkdir -p "$REPLAY_DIR/hooks" "$TASK_DIR/wheels" "$TASK_DIR/sdists"
node -e 'if(process.version!=="v22.22.3")throw Error(process.version)'
git -C "$REPO_DIR" fetch https://github.com/loopx-project/loopx.git "refs/pull/$PR_NUMBER/head"
test "$(git -C "$REPO_DIR" rev-parse FETCH_HEAD)" = "$HEAD_REF"
git -C "$REPO_DIR" fetch https://github.com/loopx-project/loopx.git "$BASE_REF"
git -C "$REPO_DIR" worktree add --detach "$BASE_DIR" "$BASE_REF"
git -C "$REPO_DIR" worktree add --detach "$HEAD_DIR" "$HEAD_REF"
uv sync --project "$BASE_DIR" --python 3.13.12 --extra test
uv sync --project "$HEAD_DIR" --python 3.13.12 --extra test
export BASE_PY="$BASE_DIR/.venv/bin/python"
export HEAD_PY="$HEAD_DIR/.venv/bin/python"
git -C "$HEAD_DIR" show "$HEAD_REF:$TEST_REL" > "$REPLAY_DIR/fixture.py"
export LOOPX_USAGE_PING=0
"$BASE_PY" - <<'PY_FIXTURE_SHA'
import hashlib,os,pathlib
assert hashlib.sha256((pathlib.Path(os.environ['REPLAY_DIR'])/'fixture.py').read_bytes()).hexdigest()==os.environ['TEST_SHA']
PY_FIXTURE_SHA
# Both worktrees execute the same durable test file. Baseline production stays at BASE_REF.
test ! -e "$BASE_DIR/$TEST_REL"
cp "$REPLAY_DIR/fixture.py" "$BASE_DIR/$TEST_REL"
(cd "$BASE_DIR" && "$BASE_PY" -m pytest -q "$TEST_REL")
(cd "$HEAD_DIR" && "$HEAD_PY" -m pytest -q "$TEST_REL" tests/control_plane/test_scheduler_arbitration_transport.py)
npm --prefix "$HEAD_DIR/apps/presentation/dashboard" ci
npm --prefix "$HEAD_DIR/apps/presentation/dashboard" run build:chat
uv build --project "$HEAD_DIR" --wheel --out-dir "$TASK_DIR/wheels"
uv build --project "$HEAD_DIR" --sdist --out-dir "$TASK_DIR/sdists"
export WHEEL="$(find "$TASK_DIR/wheels" -maxdepth 1 -name '*.whl' -print)"
export SDIST="$(find "$TASK_DIR/sdists" -maxdepth 1 -name '*.tar.gz' -print)"
uv venv --python 3.13.12 "$TASK_DIR/wheel-env"
uv venv --python 3.13.12 "$TASK_DIR/sdist-env"
export WHEEL_PY="$TASK_DIR/wheel-env/bin/python"
export SDIST_PY="$TASK_DIR/sdist-env/bin/python"
uv pip install --python "$WHEEL_PY" "$WHEEL"
uv pip install --python "$SDIST_PY" "$SDIST"The reviewed head also runs the ten transport cases. They cover the compact 64 KiB boundary, quoted/generated replies near the inline limit, serialization failure, and private snapshot cleanup.
2. Save these complete helpers
Save the following scripts exactly. They remain local validation artifacts.
cat > "$REPLAY_DIR/qualify_cli.py" <<'PY_COMPLETE_REPLAY'
"""Restore one seed at the same path; compare complete public output and durable bytes."""
from __future__ import annotations
import argparse
import base64
import hashlib
import importlib.util
import json
import os
from pathlib import Path
import shutil
import subprocess
import sys
import tempfile
parser = argparse.ArgumentParser()
parser.add_argument('--variants', required=True)
parser.add_argument('--output', required=True)
parser.add_argument('--fixture-source', required=True)
parser.add_argument('--fixture-module')
parser.add_argument('--cases', nargs='+', default=['active', 'human_gate', 'monitor', 'paused', 'stopped', 'invalid_context'])
parser.add_argument('--providers', nargs='+', default=['file', 'sqlite'])
args = parser.parse_args()
output = Path(args.output).resolve()
output.mkdir(parents=True, exist_ok=True)
hooks = Path(__file__).resolve().parent / 'hooks'
fixture_source = Path(args.fixture_source).resolve()
sys.path.insert(0, str(fixture_source / 'tests/control_plane'))
fixture_path = Path(args.fixture_module).resolve() if args.fixture_module else fixture_source / 'tests/control_plane/test_scheduler_arbitration_native_cli.py'
spec = importlib.util.spec_from_file_location('scheduler_cli_fixture', fixture_path)
fixture_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(fixture_module)
variants = json.loads(Path(args.variants).read_text())
assert variants and len({variant['name'] for variant in variants}) == len(variants)
assert os.environ.get('LOOPX_QUAL_CLOCK_EPOCH'), 'freeze seed construction and every CLI, not just the receiver'
assert float(__import__('time').time()) == float(os.environ['LOOPX_QUAL_CLOCK_EPOCH'])
import loopx
assert Path(loopx.__file__).resolve().is_relative_to(fixture_source), loopx.__file__
receipts = []
def snapshot(root):
files = {}
for path in sorted(root.rglob('*')):
if path.is_file():
raw = path.read_bytes()
files[str(path.relative_to(root))] = {
'sha256': hashlib.sha256(raw).hexdigest(), 'bytes_base64': base64.b64encode(raw).decode(),
}
return files
def execute(variant, fixture, argv, label, case_output):
environment = {**os.environ, 'LOOPX_USAGE_PING': '0',
'PYTHONPATH': os.pathsep.join([str(hooks), *variant.get('pythonpath', [])]),
'LOOPX_QUAL_EXPECTED_PACKAGE': variant['expected_package'],
'LOOPX_QUAL_TRACE': str(case_output / f'{variant["name"]}-{label}-trace.json')}
completed = subprocess.run([variant['python'], '-m', 'loopx.cli',
'--registry', str(fixture['registry']), '--runtime-root', str(fixture['runtime']),
'--format', 'json', *argv], cwd=fixture['project'], env=environment,
capture_output=True, text=True, timeout=90)
(case_output / f'{variant["name"]}-{label}-stdout.json').write_text(completed.stdout)
(case_output / f'{variant["name"]}-{label}-stderr.txt').write_text(completed.stderr)
assert completed.returncode == 0, (label, completed.stdout, completed.stderr)
result = json.loads(completed.stdout)
trace = json.loads(Path(environment['LOOPX_QUAL_TRACE']).read_text())
assert Path(trace['loopx_file']).resolve().is_relative_to(Path(variant['expected_package']).resolve()), trace
return result, trace
def canonical_snapshot(variant, fixture, label, case_output):
environment = {**os.environ, 'LOOPX_USAGE_PING': '0',
'PYTHONPATH': os.pathsep.join([str(hooks), *variant.get('pythonpath', [])]),
'LOOPX_QUAL_EXPECTED_PACKAGE': variant['expected_package'],
'LOOPX_QUAL_TRACE': str(case_output / f'{variant["name"]}-{label}-trace.json')}
script = ('import json,sys; from loopx.control_plane.coordination.canonical_snapshot import read_canonical_snapshot; '
'from loopx.control_plane.effect_runtime import effect_runtime_result; '
'print(json.dumps(read_canonical_snapshot(rpc=effect_runtime_result,runtime_root=sys.argv[1],'
'goal_id=sys.argv[2],include_leases=True,projection_readback=None,timeout=20)))')
completed = subprocess.run([variant['python'], '-c', script, str(fixture['runtime']), fixture_module.GOAL],
cwd=fixture['project'], env=environment, capture_output=True, text=True, timeout=45)
(case_output / f'{variant["name"]}-{label}.json').write_text(completed.stdout)
assert completed.returncode == 0, (completed.stdout, completed.stderr)
value = json.loads(completed.stdout)
assert value['status'] == 'loaded' and value['decision_read_from_provider'] is True
return value
def assert_stopped(receipt):
status = receipt.get('status')
if status == 'not_running':
assert not Path(receipt['info_path']).exists(), receipt
else:
assert status == 'stopped' and receipt.get('stopped') is True, receipt
def stop(variant, temporary):
environment = {**os.environ, 'PYTHONPATH': os.pathsep.join([str(hooks), *variant.get('pythonpath', [])]),
'TMPDIR': str(temporary), 'TEMP': str(temporary), 'TMP': str(temporary),
'LOOPX_QUAL_EXPECTED_PACKAGE': variant['expected_package']}
environment.pop('LOOPX_QUAL_TRACE', None)
completed = subprocess.run([variant['python'], '-c',
'import json,os,pathlib,loopx; assert pathlib.Path(loopx.__file__).resolve().is_relative_to(pathlib.Path(os.environ["LOOPX_QUAL_EXPECTED_PACKAGE"]).resolve()); '
'from loopx.control_plane.effect_runtime import restart_effect_runtime; print(json.dumps(restart_effect_runtime(wait_for_exit=True)))'],
env=environment, cwd=temporary, capture_output=True, text=True, timeout=30)
assert completed.returncode == 0, completed.stderr
receipt = json.loads(completed.stdout)
assert_stopped(receipt)
return receipt
for provider in args.providers:
for case in args.cases:
case_output = output / f'{provider}-{case}'
case_output.mkdir(exist_ok=True)
live, pristine, temporary = case_output / 'live', case_output / 'pristine', case_output / 'temporary'
temporary.mkdir(exist_ok=True)
for variable in ('TMPDIR', 'TEMP', 'TMP'):
os.environ[variable] = str(temporary)
os.environ['NODE_OPTIONS'] = ('--experimental-sqlite --import ' + str(hooks / 'freeze_clock.mjs'))
tempfile.tempdir = str(temporary)
if live.exists():
shutil.rmtree(live)
if pristine.exists():
shutil.rmtree(pristine)
live.mkdir()
fixture = fixture_module.make_scheduler_fixture(live, provider, case)
assert_stopped(fixture_module.restart_effect_runtime(wait_for_exit=True))
shutil.copytree(live, pristine)
(case_output / 'seed-state.json').write_text(json.dumps(snapshot(live), indent=2) + '\n')
reference = None
for variant in variants:
shutil.rmtree(live)
shutil.copytree(pristine, live)
packets = {}
traces = {}
try:
canonical_before = canonical_snapshot(variant, fixture, 'canonical-before', case_output)
packets['guard'], traces['guard'] = execute(variant, fixture, fixture['guard'], 'guard', case_output)
hint = packets['guard']['scheduler_hint']
expected = {
'active': ('bounded_delivery', 'run_now', 'active_work', 'interaction_agent_attempt_required'),
'human_gate': ('user_gate', 'backoff_waiting_for_user', 'human_gate', 'interaction_blocking_user_gate'),
'monitor': ('monitor_quiet_skip', 'backoff_until_material_transition', 'monitor_wait', 'interaction_monitor_quiet_wait'),
'paused': ('skip', 'stop_until_explicit_resume', 'quota_paused', 'quota_paused'),
'stopped': ('skip', 'stop_until_explicit_resume', 'goal_stopped', 'goal_stopped'),
'invalid_context': ('bounded_delivery', 'repair_scheduler_execution_context', 'control_plane_repair', 'invalid_scheduler_execution_context'),
}[case]
assert (packets['guard']['interaction_contract']['mode'], hint['action'], hint['cadence_class'], hint['reason_code']) == expected
fixture_module._assert_no_private_arbitration(packets['guard'])
states = {'guard': snapshot(live)}
if case == 'active':
binding = ['--goal-id', fixture_module.GOAL, '--agent-id', fixture_module.AGENT,
'--todo-id', fixture_module.TODO, '--turn-instance-id', fixture_module.TURN]
packets['refresh'], traces['refresh'] = execute(variant, fixture,
['refresh-state', *binding, '--classification', 'validated_intermediate_progress',
'--delivery-batch-scale', 'implementation', '--delivery-outcome', 'outcome_progress',
'--delivery-boundary', 'in_flight_continuation', '--delivery-workspace-path', str(fixture['project']),
'--no-global-sync', '--suppress-external-sinks'], 'refresh', case_output)
packets['spend'], traces['spend'] = execute(variant, fixture,
['quota', 'spend-slot', *binding, '--slots', '1', '--source', 'heartbeat', '--execute'], 'spend', case_output)
restart_receipt = stop(variant, temporary)
packets['settled_replay'], traces['settled_replay'] = execute(variant, fixture,
fixture['guard'], 'settled_replay', case_output)
assert traces['guard']['native_pid'] != traces['settled_replay']['native_pid'], 'managed runtime did not restart'
assert packets['settled_replay']['interaction_contract']['mode'] == 'heartbeat_settled_skip'
assert packets['settled_replay']['scheduler_hint']['action'] == 'preserve_current_schedule'
states['settled_replay'] = snapshot(live)
else:
restart_receipt = stop(variant, temporary)
packets['restart_replay'], traces['restart_replay'] = execute(variant, fixture,
fixture['guard'], 'restart_replay', case_output)
assert traces['guard']['native_pid'] != traces['restart_replay']['native_pid'], 'managed runtime did not restart'
states['restart_replay'] = snapshot(live)
canonical_after = canonical_snapshot(variant, fixture, 'canonical-after', case_output)
assert canonical_before == canonical_after, f'canonical records or revision changed: {provider}/{case}/{variant["name"]}'
complete = {'packets': packets, 'states': states,
'canonical_before': canonical_before, 'canonical_after': canonical_after}
(case_output / f'{variant["name"]}-complete.json').write_text(json.dumps(complete, indent=2) + '\n')
if reference is None:
reference = complete
reference_process_ids = {pid for trace in traces.values()
for pid in (trace['cli_pid'], trace['native_pid']) if pid is not None}
assert complete['packets'] == reference['packets'], f'complete public output differs: {provider}/{case}/{variant["name"]}'
assert complete['canonical_before'] == reference['canonical_before']
assert complete['canonical_after'] == reference['canonical_after']
assert complete['states'].keys() == reference['states'].keys()
lock_owners = []
key_order_only = []
process_ids = {pid for trace in traces.values() for pid in (trace['cli_pid'], trace['native_pid']) if pid is not None}
for phase, files in complete['states'].items():
prior = reference['states'][phase]
assert files.keys() == prior.keys(), f'persisted paths differ: {provider}/{case}/{variant["name"]}/{phase}'
for path, value in files.items():
other = prior[path]
if value == other:
continue
raw = base64.b64decode(value['bytes_base64'])
previous_raw = base64.b64decode(other['bytes_base64'])
try:
current_json, previous_json = json.loads(raw), json.loads(previous_raw)
except ValueError:
raise AssertionError(f'non-JSON durable bytes differ: {phase}/{path}') from None
if current_json == previous_json:
key_order_only.append(f'{phase}/{path}')
continue
if path.endswith('.lock') and isinstance(current_json, dict) and isinstance(previous_json, dict):
assert {key: value for key, value in current_json.items() if key != 'pid'} == {
key: value for key, value in previous_json.items() if key != 'pid'}, f'lock metadata differs beyond owner: {phase}/{path}'
assert current_json['pid'] in process_ids, f'lock owner outside observed CLI/native: {phase}/{path}'
assert previous_json['pid'] in reference_process_ids, f'reference lock owner outside observed CLI/native: {phase}/{path}'
lock_owners.append({'path': f'{phase}/{path}', 'reference_pid': previous_json['pid'],
'actual_pid': current_json['pid'], 'both_observed': True})
continue
raise AssertionError(f'complete persisted JSON value differs: {provider}/{case}/{variant["name"]}/{phase}/{path}')
counts = {}
for label, trace in traces.items():
count = {}
for request in trace['requests']:
key = f'{request["method"]}:operation={request.get("operation")}:scope={request["request_scope"]}'
count[key] = count.get(key, 0) + 1
counts[label] = count
receipt = {'provider': provider, 'scenario': case, 'variant': variant['name'],
'complete_sha256': hashlib.sha256(json.dumps(complete, sort_keys=True, separators=(',', ':')).encode()).hexdigest(),
'public_output_equal_to_first': True, 'complete_domain_state_equal_to_first': True,
'runtime_restart': {'stop_receipt': restart_receipt,
'before_pid': traces['guard']['native_pid'],
'after_pid': traces['settled_replay' if case == 'active' else 'restart_replay']['native_pid'],
'pid_changed': True},
'public_output_sha256': hashlib.sha256(json.dumps(packets, sort_keys=True, separators=(',', ':')).encode()).hexdigest(),
'infrastructure_lock_owner_differences': lock_owners,
'json_key_order_only': key_order_only, 'effect_boundary_counts': counts,
'module': traces['guard']['loopx_file'], 'python': traces['guard']['python'],
'wall_clock': traces['guard']['wall_clock']}
receipts.append(receipt)
(output / 'receipts.json').write_text(json.dumps(receipts, indent=2) + '\n')
print(json.dumps(receipt), flush=True)
finally:
cleanup_errors = []
for owned_variant in variants:
try:
stop(owned_variant, temporary)
except Exception as error:
cleanup_errors.append({'variant': owned_variant['name'], 'error': str(error)})
assert not cleanup_errors, cleanup_errors
PY_COMPLETE_REPLAY
cat > "$REPLAY_DIR/hooks/sitecustomize.py" <<'PY_CLOCK_AND_TRACE'
"""Private qualification: freeze wall clocks and observe the actual Effect boundary."""
import atexit
import datetime
import hashlib
import json
import os
import pathlib
import sys
import time
if os.environ.get('LOOPX_QUAL_CLOCK_EPOCH'):
epoch = float(os.environ['LOOPX_QUAL_CLOCK_EPOCH'])
original_datetime = datetime.datetime
original_date = datetime.date
class FrozenDatetime(original_datetime):
@classmethod
def now(cls, tz=None):
return cls.fromtimestamp(epoch, tz)
@classmethod
def today(cls):
return cls.fromtimestamp(epoch)
@classmethod
def utcnow(cls):
return cls.fromtimestamp(epoch, datetime.timezone.utc).replace(tzinfo=None)
class FrozenDate(original_date):
@classmethod
def today(cls):
value = FrozenDatetime.now()
return cls(value.year, value.month, value.day)
datetime.datetime = FrozenDatetime
datetime.date = FrozenDate
time.time = lambda: epoch
time.time_ns = lambda: int(epoch * 1_000_000_000)
if os.environ.get('LOOPX_QUAL_TRACE'):
import loopx
from loopx.control_plane import effect_runtime
expected = pathlib.Path(os.environ['LOOPX_QUAL_EXPECTED_PACKAGE']).resolve()
actual = pathlib.Path(loopx.__file__).resolve()
if not actual.is_relative_to(expected):
raise RuntimeError(f'qualification package provenance mismatch: {actual} outside {expected}')
original_request = effect_runtime.effect_runtime_request
requests = []
def observed_request(method, params, **kwargs):
entry = {'method': method, 'operation': params.get('operation'), 'params': params, 'request_scope': effect_runtime._REQUEST_RUNTIME_REVISION.get() is not None,
'params_sha256': hashlib.sha256(json.dumps(params, sort_keys=True, ensure_ascii=True,
separators=(',', ':')).encode()).hexdigest()}
requests.append(entry)
try:
result = original_request(method, params, **kwargs)
entry['result'] = result
entry['result_sha256'] = hashlib.sha256(json.dumps(result, sort_keys=True, ensure_ascii=True,
separators=(',', ':')).encode()).hexdigest()
return result
except Exception as exc:
entry['error'] = {'type': type(exc).__name__, 'message': str(exc)}
raise
effect_runtime.effect_runtime_request = observed_request
def save_trace():
fingerprint = effect_runtime._runtime_fingerprint()
info = effect_runtime._read_info(effect_runtime._runtime_info_path(fingerprint), fingerprint=fingerprint) or {}
pathlib.Path(os.environ['LOOPX_QUAL_TRACE']).write_text(json.dumps({
'python': sys.executable, 'python_version': sys.version, 'loopx_file': str(actual),
'cli_pid': os.getpid(), 'native_pid': info.get('pid'), 'runtime_identity': info.get('runtime_identity'),
'wall_clock': time.time(), 'argv': sys.argv, 'requests': requests,
}, indent=2) + '\n')
atexit.register(save_trace)
PY_CLOCK_AND_TRACE
cat > "$REPLAY_DIR/hooks/freeze_clock.mjs" <<'JS_CLOCK'
// Private qualification: preserve monotonic/performance clocks.
if (process.env.LOOPX_QUAL_CLOCK_EPOCH) {
const epoch = Number(process.env.LOOPX_QUAL_CLOCK_EPOCH) * 1000;
const RealDate = globalThis.Date;
globalThis.Date = new Proxy(RealDate, {
apply() { return new RealDate(epoch).toString(); },
construct(target, args, receiver) { return Reflect.construct(target, args.length ? args : [epoch], receiver); },
get(target, property, receiver) {
return property === 'now' ? () => epoch : Reflect.get(target, property, receiver);
},
});
}
JS_CLOCK3. Bind the four actual package roots and check production bytes
The installed children receive the hook directory in PYTHONPATH. The source checkouts are supplied only to source variants. The controller uses the baseline environment and the exact fixture SHA above.
(cd "$REPLAY_DIR" && "$BASE_PY" - <<'PY_VARIANTS'
import hashlib,json,os,pathlib,subprocess
root=pathlib.Path(os.environ['REPLAY_DIR'])
variants=[]
for name,directory,python in [('base',os.environ['BASE_DIR'],os.environ['BASE_PY']),('head',os.environ['HEAD_DIR'],os.environ['HEAD_PY'])]:
variants.append({'name':name,'python':python,'pythonpath':[directory],'expected_package':str(pathlib.Path(directory)/'loopx')})
clean_env={**os.environ,'PYTHONPATH':''}
for name,variable in [('wheel','WHEEL_PY'),('sdist','SDIST_PY')]:
python=os.environ[variable]
package=subprocess.check_output([python,'-c','import pathlib,loopx;print(pathlib.Path(loopx.__file__).resolve().parent)'],env=clean_env,text=True).strip()
variants.append({'name':name,'python':python,'pythonpath':[],'expected_package':package})
paths=['control_plane/effect_runtime.py','control_plane/effect_runtime_handlers.ts','control_plane/effect_runtime_server.ts','control_plane/quota/should_run.py','control_plane/quota/should_run_packet.py','control_plane/scheduler/arbitration.py','control_plane/scheduler/scheduler_hint.py','control_plane/work_items/interaction_contract.py','control_plane/work_items/interaction_contract.ts']
source=pathlib.Path(os.environ['HEAD_DIR'])/'loopx'
expected={p:hashlib.sha256((source/p).read_bytes()).hexdigest() for p in paths}
for variant in variants[2:]:
package=pathlib.Path(variant['expected_package'])
assert {p:hashlib.sha256((package/p).read_bytes()).hexdigest() for p in paths}==expected,variant['name']
artifacts={name:{'sha256':hashlib.sha256(pathlib.Path(os.environ[variable]).read_bytes()).hexdigest()} for name,variable in [('wheel','WHEEL'),('sdist','SDIST')]}
(root/'variants.json').write_text(json.dumps(variants,indent=2)+'\n')
(root/'package-replay-receipt.json').write_text(json.dumps({'base':os.environ['BASE_REF'],'head':os.environ['HEAD_REF'],'fixture_sha256':os.environ['TEST_SHA'],'harness_sha256':hashlib.sha256((root/'qualify_cli.py').read_bytes()).hexdigest(),'product_sha256':expected,'artifacts':artifacts},indent=2)+'\n')
PY_VARIANTS
)
LOOPX_USAGE_PING=0 PYTHONHASHSEED=0 LOOPX_QUAL_CLOCK_EPOCH=1792137600 \
PYTHONPATH="$REPLAY_DIR/hooks:$BASE_DIR" \
"$BASE_PY" "$REPLAY_DIR/qualify_cli.py" \
--variants "$REPLAY_DIR/variants.json" \
--output "$REPLAY_DIR/evidence" \
--fixture-source "$BASE_DIR" \
--fixture-module "$REPLAY_DIR/fixture.py"
"$BASE_PY" - <<'PY_RECEIPTS'
import json,os,pathlib
root=pathlib.Path(os.environ['REPLAY_DIR'])/'evidence'
rows=json.loads((root/'receipts.json').read_text())
assert len(rows)==48
for provider in ['file','sqlite']:
for case in ['active','human_gate','monitor','paused','stopped','invalid_context']:
selected=[row for row in rows if row['provider']==provider and row['scenario']==case]
assert len(selected)==4
assert len({row['public_output_sha256'] for row in selected})==1
assert all(row['public_output_equal_to_first'] and row['complete_domain_state_equal_to_first'] and row['runtime_restart']['pid_changed'] for row in selected)
print(json.dumps({'provider':provider,'scenario':case,'variants':[row['variant'] for row in selected],'public_json_sha256':selected[0]['public_output_sha256'],'canonical_and_domain_values_equal':True,'restart_pid_changed':True}))
PY_RECEIPTSEach source/installed child verifies its actual Python module root and records its native runtime PID/version, complete Effect boundary calls, and whether the production request scope was active. The active case executes refresh-state, spend-slot, a runtime restart, and settled replay. Other cases repeat their guard after a restart. Every row requires a changed native PID and a stopped or independently absent runtime receipt. Cleanup attempts every owned variant even if one stop fails. Monitor polling retains its expected no-spend audit row.
Evidence stays in the reviewer's scratch directory: complete stdout/stderr, canonical readbacks, RPC traces, seed snapshots, and all persisted file bytes. Fingerprints include local synthetic paths, so compare the four variants within each row. A failed invariant, changed public field, domain value, unexpected path, or unknown lock owner stops the script. An environment error does not count as a passed row.
4. Prove that the same harness rejects a semantic mutation
This changes one TypeScript branch in a separate package copy. The original worktrees and installed packages remain available for review. The expected failure is the active case's literal run_now invariant.
"$BASE_PY" - <<'PY_MUTANT'
import hashlib,json,os,pathlib,shutil
root=pathlib.Path(os.environ['REPLAY_DIR'])
mutant=root/'mutant-source'
assert not mutant.exists()
shutil.copytree(pathlib.Path(os.environ['HEAD_DIR'])/'loopx',mutant/'loopx',ignore=shutil.ignore_patterns('__pycache__','*.pyc'))
path=mutant/'loopx/control_plane/work_items/interaction_contract.ts'
original=path.read_bytes()
old='if (must_attempt) return ["active_work", "interaction_agent_attempt_required"];'
new='if (must_attempt) return ["quiet_wait", "interaction_agent_attempt_required"];'
text=original.decode()
assert text.count(old)==1
path.write_text(text.replace(old,new))
variants=json.loads((root/'variants.json').read_text())
(root/'mutant-variants.json').write_text(json.dumps([variants[0],{'name':'mutant','python':os.environ['BASE_PY'],'pythonpath':[str(mutant)],'expected_package':str(mutant/'loopx')}],indent=2)+'\n')
(root/'mutation-input.json').write_text(json.dumps({'original_sha256':hashlib.sha256(original).hexdigest(),'mutant_sha256':hashlib.sha256(path.read_bytes()).hexdigest(),'replacement_count':1},indent=2)+'\n')
PY_MUTANT
if LOOPX_USAGE_PING=0 PYTHONHASHSEED=0 LOOPX_QUAL_CLOCK_EPOCH=1792137600 \
PYTHONPATH="$REPLAY_DIR/hooks:$BASE_DIR" \
"$BASE_PY" "$REPLAY_DIR/qualify_cli.py" \
--variants "$REPLAY_DIR/mutant-variants.json" \
--output "$REPLAY_DIR/mutation-evidence" \
--fixture-source "$BASE_DIR" --fixture-module "$REPLAY_DIR/fixture.py" \
--cases active --providers file > "$REPLAY_DIR/mutation.log" 2>&1; then
echo 'ERROR: the semantic mutant passed' >&2
exit 1
else
test "$?" = 1
fi
"$BASE_PY" - <<'PY_MUTATION_PROOF'
import json,os,pathlib
root=pathlib.Path(os.environ['REPLAY_DIR'])
case=root/'mutation-evidence/file-active'
packet=json.loads((case/'mutant-guard-stdout.json').read_text())
trace=json.loads((case/'mutant-guard-trace.json').read_text())
assert pathlib.Path(trace['loopx_file']).is_relative_to(root/'mutant-source/loopx')
assert packet['interaction_contract']['mode']=='bounded_delivery'
assert packet['scheduler_hint']['action']!='run_now'
assert any(request['method']=='work_item.interaction_reads.project' and request.get('result',{}).get('result',{}).get('arbitration',{}).get('disposition')=='quiet_wait' for request in trace['requests'])
assert 'AssertionError' in (root/'mutation.log').read_text()
print(json.dumps({'physical_ts_mutation_executed':True,'same_cli_harness_rejected':True,'independent_invariant':'active work requires scheduler action run_now'}))
PY_MUTATION_PROOFRetained V3 performance misses
The earlier measured candidate 69186e5885feb9ecc4b4156ff8d10c8527788195 used baseline ef05bb2d9b250af0d05e8dadd47a48b69226fc74. It completed one frozen run. Its source checkpoint is preserved at that commit. These valid misses remain recorded:
| File/monitor measurement | Observed result | Original gate |
|---|---|---|
| Warm non-durable native p95 | 2.158608 ms | Strictly below 2 ms |
| Complete CLI p95, 64 alternating pairs | 832.624079 -> 900.477825 ms; +8.149386%, +67.853746 ms | At most +5% and +25 ms |
No sample was dropped or relabeled as environmental noise. The V3 seal SHA256 is eed5fe661e5c274da88d03452f8d9cf3ca6ebbefc7036da60ec088129a8244e0.
Source inspection found unconditional response-sink I/O for small projections. The V4 source uses ordinary inline transport for complete compact ASCII parameters up to 64 KiB. Larger inputs and failed size probes retain the existing private snapshot path. The 2 MiB inline and 64 MiB snapshot limits remain unchanged. This is a changed source revision with fresh qualification and the same frozen sample counts and gates. The V3 misses remain separate from the final head's results.
Retained V4 performance gate miss
V4 HEAD was ce2e9635d53c75354adea244642d178d717fbece, with baseline dda6f7ef79b2f88bf66ec335c12f027b2e2976d9. Its complete record remains separate. The valid File/monitor additive-gate miss remains an owner review requirement. No V5 result is treated as a repair or as evidence that V4 was environmental noise.
Historical V4: owner_review_hold
The frozen V4 run completed once, with zero retries. All 48 source/base/wheel/sdist CLI qualification runs and the physical TypeScript mutation check passed. All four warm native p95 values are below 2 ms. The File/monitor complete CLI row exceeds the separate 25 ms additive gate. This PR has not passed every performance gate.
| File/SQLite case | Warm native transaction p95, base -> head (ms) | Complete CLI p95, base -> head (ms) | CLI p95 change | Gate |
|---|---|---|---|---|
| File active | 1.115814 -> 0.691607 | 635.585804 -> 638.786536 | +0.503588%; +3.200732 ms | Pass |
| File monitor | 1.342389 -> 1.085817 | 783.327287 -> 809.739958 | +3.371856%; +26.412671 ms | Hold: exceeds 25 ms |
| SQLite active | 1.309567 -> 0.766808 | 672.619207 -> 663.347898 | -1.378389%; -9.271309 ms | Pass |
| SQLite monitor | 1.136332 -> 0.711574 | 898.165726 -> 803.763056 | -10.510607%; -94.402670 ms | Pass |
The baseline transaction has two selected native requests; the candidate has one. The full active CLI uses 3 -> 2 selected calls; monitor uses 12 -> 8. Every selected request uses the real production request scope. Each complete CLI row uses 64 alternating matched pairs. All 256 pairs preserve complete public JSON and durable domain values. Cold/warm/burst use 16/128/256 observations per variant and row. Quantiles use nearest rank, without sample removal. The CLI gate requires both <=5% and <=25 ms; the native gate requires strictly <2 ms. The fixed wall clock also applies to seeding; performance clocks remain real.
All owned managed runtimes stopped. The exact source, script, raw sample and state evidence seal SHA256 is ecef977f9c3334c212237c7df285a52f3c376dfb363de416d8606a46fae9a846. The protocol SHA256 is 93c6b357101b392bbafe4a177a29c7c3f558dafe1e76931381e4841fb40de665. The V3 misses remain recorded in this packet. These synthetic Linux checks do not establish real-model or external automation behavior.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max
REQUEST_CHANGES · head f8555130aab4ceb3e5dcea35884fa70c6e01b209
[P2] 一起迁移仍调用旧签名的三个公开 smoke。 build_scheduler_hint 删除 agent_scope_frontier_actions 并要求调用者提供 arbitration,但 interaction-contract-state-machine-smoke.py:189 仍传旧 keyword,quota-scheduler-hint-compaction-smoke.py 与 quota-scheduler-policy-smoke.py 仍未提供新 record。本次在实际基线和精确 head 执行同三条命令:base 全部 exit0;head 分别抛 TypeError: ... unexpected keyword argument 'agent_scope_frontier_actions' 和两次 ValueError: scheduler arbitration must come from the interaction projection。原生 premerge 也选中并报出第一项。请在本提案迁移这三处既有调用,接到现有原生组合结果并保留原断言,再执行相关 canary;不要删覆盖或恢复第二个 Python 仲裁 owner。位置:loopx/control_plane/scheduler/scheduler_hint.py:1298。
动机
需要通过定时唤醒持续推进 Goal、同时依赖现有调度验证保护恢复行为的维护者和用户。旧路径先构造交互要求,再由 Python 调用一次原生一致性检查并选择调度动作;新路径在同一次原生投影中返回要求和仲裁结果,减少往返。但三个现存公开 smoke 的调用方式未迁移,当前直接报错。真实 File/SQLite 的六类 CLI 场景在源码及正常 wheel、sdist 安装中保持完整输出和持久状态,重启后仍正确等待或结算;公开验证入口的兼容缺口和既有性能 hold 尚未关闭。本次不迁移整个 scheduler、cadence、Host IO 或存储事务,不证明 Windows、PostgreSQL、真实模型、已安装 App、外部自动化或长期收益,也不放宽原性能门。先迁移三个仍在使用旧 helper 签名的现有公开 smoke;原 V3/V4/V5 的有效性能失败继续由本迁移 owner 处理,不能用这次正确性重放覆盖。
实际基线 052f492767a1d893dfb96a9f777331459fd4c5ae,完整提案27路径。先读 docs/architecture/rfcs/typescript-control-plane-migration-v0.md 在该不可变版本中的 2.4 Replacement, not production dual-running、5. Payoff-phase PR contract、Caller-observable semantic parity is a promotion gate 与 Performance。这些既有条款支持合并一个真实热路径的决策 owner,也要求接通真实消费者、保留诊断/恢复及原性能门;PR 自己新增的 RFC checkpoint 不能证明这些条件已满足。后续整体 R5 与正式安装采用继续由原路线验收,没有为本批新增门槛。
改动思路
仲裁规则适合归入既有 TS interaction owner,与已经必须执行的 required-read 投影同一次调用;Python 只保留输入 codec、结果适配和尚未迁移的 cadence。本提案是现有 quota 两个 producer 的仲裁 consumer 切换,必须同时接通现有验证消费者;它不关闭整体 scheduler、安装采用或性能资格。
以前 required-read 投影后,Python 再组织结构诊断、调用独立 native consistency RPC 并选 disposition;现在 projectInteractionRequiredReads 在既有 TS 模块内组合 reads 和 projectSchedulerArbitration。两个 quota producer 把返回的私有 SchedulerArbitration 直接传给 hint,公开 interaction dictionary 不增加仲裁字段。已有 consistency kernel 继续负责共同非法状态,诊断顺序与 first-match 优先级只在同一 TS owner 维护,生产环境没有新旧双跑。
| 调用边界 | base | 当前 head |
|---|---|---|
| 一个选定的构造/仲裁对 | reads + 独立 consistency | 同一现有原生投影 |
| 实际 active guard 的相关家族调用 | 3 | 2 |
| 实际 monitor guard 的相关家族调用 | 12 | 8 |
| cadence、Host IO、存储提交 | 原 owner | 原 owner |
这是实际生产 request scope 的 CLI trace;它不是所有 RPC 总数,更不能代替端到端延迟。dict-only 的后续 cooldown/recovery 构造仍保留原字典 API,丢弃未消费的私有 record,不覆盖 hint 较早的决定。
具体改动
9个产品文件为 +155/−196,净−41;15个测试/夹具为+620/−50;2份双语 RFC checkpoint +29;手工维护的 tsconfig 编译纳入项+1。不是把整片代码量都算成纯规则删除:删除的139行定义还含签名、docstring、codec/transport。原 Python _required_bool、_classify_disposition、build_scheduler_arbitration 和 standalone consistency handler 被移除;Python 仍保留 scalar/Mapping codec、Enum/dataclass 结果适配、私有 pair 及未迁移的 cadence。退出条件对应真实 hint/五个 dict construction caller,而不是抽象的“以后迁移”。
projectSchedulerArbitration 累积 schema/通道/布尔结构错误,再复用 interactionConsistencyIssues,最后按既有优先级决定终止、peer/monitor 等待、人类 gate、settled、replan 或 active。non-gating notice 仍需 non_gating_notice=true 与 wait_source=turn_settlement 同时成立;invalid/terminal/spend 矛盾不产生工作授权。没有 substring denylist 或从 prose 猜状态。
完整 compact ASCII facts ≤64KiB 时走 inline;更大的输入与探测序列化失败复用既有私有 snapshot,不截断;2MiB wire/64MiB snapshot 上限不变。原 reads 透传、最多3条生成 read、shell quoting 和有界诊断支持文档所述保守输出上界。10个实际 transport 用例覆盖64KiB边界、Unicode/引号、超大回复、近 wire cap、原序列化错误和私有文件清理。这里迁移的是内部决定组合,不新增 operator-facing 读模型;没有用内部 tuple 冒称整个 quota 投影封套或所有平台已经迁移。
独立验证:377 Python、45 native TS 测试通过,包含目前新增 transport/caller tests;control-plane TypeScript、Ruff、先 diff advisory 后完整 semantic smoke、workspace contract、正常 Chat/wheel/sdist 构建通过。两份全新隔离安装的9个产品文件与源码及归档逐字节一致。
用同一个完整 CLI harness 与不可变 synthetic fixture,在真实 File/SQLite 上对 active、人类 gate、monitor、paused、stopped、invalid-context 六类场景执行 base/source/wheel/sdist:48行全部通过。保留全部 public JSON、完整持久 domain 值与 path sets、canonical revision/Todos/leases、真实进程 owner,而非只比字段名/原因码。active 完成实际 refresh/spend,停原生进程后同 Turn replay;其他场景也实际重启并核对 PID 改变。再将私有拷贝的 TS active 分支物理改成 quiet_wait,相同 public CLI harness 因 run_now 不成立而失败;原 source/packages 未改。以上是有界正确性证据,不是模型或长期运行收益。
对主干的风险
当前最直接的回归是 F1:新增的 test-only adapter 把测试调用迁移了,所以377/45可以绿;仓库仍可执行的三个公开 smoke 却遗漏。原生 canary 有5项 direct、19项 selected,独立报出 interaction-contract-state-machine 的签名错误。另两项实际命令独立复现,不是从 traceback 猜测。修复应迁移这些验证消费者,保留跨层断言和紧凑/详细输出断言;不能把它们当 obsolete 删除,也不必为同仓库源调用恢复旧 Python 决策。
maintainability 的 DSH advisory 单独保留:同一命令在实际 base/head 都 exit1,完整 stdout/stderr 逐字节相同,因果 dsh_operation_host.py 未变,magnitude regression0。它不解释本次新 smoke 失败,也不被写成通过。
原性能资格仍是 owner_review_hold:公开 exact-head V5 SQLite/monitor p95 为2115.061687→2293.734649ms(+8.447648%、+178.672962ms);V4 File/monitor +26.412671ms 的有效失败也保留。本次独立重放正确性与实际调用数,没有重跑原冻结计时协议,也没有证明这些尾延迟已被修复或因环境而无效。warm helper 更快、调用更少或另一次集成正确性成功都不覆盖既有5%/25ms门。Windows、PG、外部 Host、真实模型及 installed App 没有被本结果认证;该纯投影组合不新增PG写事务。本次遵守当前 no-CI 策略,没有查询、轮询、等待或触发 hosted CI。
我的整体评价
迁移方向和大小基本合理:一个既有 TS owner,真实重复 Python 规则和独立 leaf handler 被移除,输入/结果适配都有具体剩余 caller;不是为了迁移而新增服务。相关 future-facing pass 已应用在规则去重和现有 coarse operation 组合;可把本地 disposition 返回类型进一步收紧为既有 vocabulary 的 union,但无需新 schema 框架或额外迁移项目。
当前 head 请求修改:先把三个既有公开 smoke 消费者一同迁移并让原断言重新执行;同时继续保留、处理原性能 hold。48行 public CLI/状态重启对照证明当前选定生产路径的正确性,不能把没迁移的验证入口或未满足的性能门涂绿。本评审不授予合并、默认采用或整体 scheduler 完成状态。
English verdict: REQUEST_CHANGES - f8555130aab4ceb3e5dcea35884fa70c6e01b209 breaks three existing public scheduler smoke callers: each passes at the immutable base and crashes on this head after the helper API change. 377 Python/45 native tests and48real File/SQLite base/source/wheel/sdist CLI/restart comparisons pass, including physical TS mutation sensitivity. The original V3/V4/V5 performance holds remain; this review neither reran nor waived their frozen timing gates. CI was not consulted.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max
[P2] F1:在接受本次 cutover 前,补齐当前组合的原性能资格,继续保留现有 hold。 三个遗漏的公开 smoke 已修复,但当前完整 head 仍没有解除原冻结性能失败的资格。本 PR 明确保留 V5 SQLite/monitor 完整 CLI p95 2115.061687→2293.734649 ms(+8.447648%、+178.672962 ms),以及 V4 File/monitor +26.412671 ms;原门是5%和25ms。新 head 合入 main 并迁移 smoke,不会自行证明尾延迟已恢复。最小修复是由迁移 owner 在有实质来源变化的候选上,按原协议和阈值提供对应不可变 base/head 的完整 CLI、重试/monitor 及适用打包读回资格;在此之前保持 owner_review_hold。这不是本轮重新测得的当前延迟,也不是发现了新的性能因果。
动机
依靠调度唤醒持续推进 Goal、并依赖公开 smoke 验证调度行为的维护者和用户。
旧路径先投影交互要求,再由 Python 组织调度规则并调用一致性检查;新路径把两项组合到已有原生交互 owner,减少同一操作的跨运行时往返。
当前三个公开验证入口已能继续执行,377个相关 Python 测试和46个原生测试通过;完整迁移的性能与当前集成资格仍未闭合。
本次只覆盖一个仲裁消费者切换,不迁移整个 scheduler、cadence、Host IO 或存储写事务,也不认证 Windows、PostgreSQL、真实模型、已安装 App 或长期净收益。
改动思路
将仲裁归入已有交互 owner,既移除重复权威,也保留 cadence 和 Host IO 的职责。
方向合理:结构诊断、共享一致性与 first-match 调度选择进入现有 work_items/interaction_contract.ts,Python 保留输入/结果适配和未迁移的 cadence。相同 required-read 投影返回私有仲裁结果,生产不保留第二套 Python 决策,也不在公共 interaction dictionary 增加字段。
当前 PR 边界是 quota 的普通与暂停两个 producer 消费同一次原生投影,并将已有测试消费者一起迁移;正确性通过不会自动关闭原性能 hold。保留整个旧 Python 仲裁只是为了同仓库 smoke 使用旧签名,会恢复重复权威;当前把三个 smoke 接到真实原生结果是更小、可回滚的办法。没有新服务、设置或手工同步字段。Python 的 Enum/dataclass 是边界适配,仍有具体 cadence/hint caller,其退出条件保留。
| 边界 | 旧路径 | 当前提案 |
|---|---|---|
| 选定构造/仲裁对 | required reads 后再调独立 consistency | 一个既有投影返回 reads 与 arbitration |
| 完整 facts ≤64KiB | 没有组合仲裁 | inline,保留完整内容 |
| 大 facts 或大小探测失败 | 原有序列化/传输规则 | 复用私有 snapshot,保留原错误和清理 |
| cadence、Host IO、持久化 | 原 owner | 原 owner |
此表是源码解释。本轮的独立执行见下文;历史 RPC 数和性能样本没有被当作当前 head 的新测量。
具体改动
完整 head c6300a5eb39d0d70d6c110049f271ec4a4d6fc11,实际不可变 base 5c6ec1a1c3053ce41993ce2ba4598766dec67bc6,全部30路径、+840/-252。对照旧评审 f8555130aab4ceb3e5dcea35884fa70c6e01b209 同时检查修复增量和整个当前提案;18个改动路径全文同字节,其余包含三个 smoke 和 main 的运行时/投影集成,不能直接继承旧包或性能资格。
独立依据为 docs/architecture/rfcs/typescript-control-plane-migration-v0.md 在 5c6ec1a1c3053ce41993ce2ba4598766dec67bc6 的原已接受条款,未用本提案新增 checkpoint 自证:2.4 Replacement, not production dual-running 的单 owner/删除替换在当前源码落实;5. Payoff-phase PR contract 的经济账和具体 facade 退出条件已说明;Caller-observable semantic parity is a promotion gate 的当前同 fixture 不可变 base/head 全量生产调用与打包资格仍未由本轮补齐,旧48行只绑定旧 head;Performance 的原有效失败仍 not_met,不能以 helper 更快或 CI/正确性绿灯替代。
关键代码讲解
schedulerDisposition/projectSchedulerArbitration,loopx/control_plane/work_items/interaction_contract.ts:125,在同一 TS owner 累积结构诊断、复用 consistency kernel、按既有顺序选择 disposition。布尔必须为实际 boolean;终止/settled 与工作或 spend 矛盾时返回 repair,不凭 lower-level quota 字段发工作授权。non-gating retry 仍同时要求准确 notice 和 settlement source。_interaction_reads_and_arbitration,loopx/control_plane/work_items/interaction_contract.py:1092,只运送现有 facts,在64KiB完整 compact ASCII JSON 边界决定是否走既有 snapshot;保留 Unicode、引号、unknown metadata、原 reads 和原序列化错误。SchedulerArbitration.from_projection做返回形状/枚举适配,没有恢复 Python 规则。_build_interaction_contract_projection,interaction_contract.py:1720,供两个真实 quota producer 同时取得公开 contract 和私有 record;dict-only wrapper 丢弃未消费 record。其后的 post-writeback、vision/fallback 附加只写相应上下文,不改变这里消费的渠道布尔和 retry-source,已检查这一时序。build_scheduler_hint,loopx/control_plane/scheduler/scheduler_hint.py:1294,消费显式 record,合法调度上下文缺失 record 时明确失败;原缺失执行上下文和暂停/停止优先路径保留。三个公开 smoke 现在调用同一 projection 并传 record,原紧凑/详细输出、state-machine 和政策断言继续执行。
其余改动面包括双方 snapshot allowlist、删除 standalone consistency handler、测试适配/真实 File-SQLite CLI 与 transport 负例、原生决策表、双语 RFC 和 tsconfig 纳入项,均已读取。9个产品路径 +155/-196,净−41;测试、smoke、配置和文档另计,不把定义中的 codec/docstring 全当纯规则删除。
对主干的风险
当前代码验证已修复旧 F1:同三条公开 smoke 均 exit0,未删原断言或恢复重复 Python owner。377个 Python 测试通过,其中12个真实子进程 CLI 场景覆盖 File/SQLite 的 active、human gate、monitor、paused、stopped、invalid-context,active 实际 refresh/spend 后重启并读回 settled replay;合成独立 authority 没有使用活动 Goal。46个原生测试及 TS typecheck 通过,transport 覆盖64KiB边界、接近 wire cap、超大回复、NUL、Unicode、非法序列化和私有文件清理。
先执行 advisory,再执行完整 semantic/premerge;6个直接检查和19个所选检查均通过。唯一 advisory 候选是现有双方 transport allowlist 的既有 operation:扩展私有支持范围,未新增 operation 或公共状态词汇。没有 substring denylist、特定业务领域义务或把 must_attempt 称为建议。main 的独立运行时/投影变更已识别为复用失效输入,旧48行 source/wheel/sdist 对照和旧计时协议不能由本轮测试数量升级为当前组合资格。
最强未关闭反例仍是:选定 helper/RPC 更少,但真实 monitor 链完整 CLI 尾延迟仍可能上升;原 V5 就暴露了这一点。当前未重跑冻结协议,未移除样本、扩大阈值、归为环境噪声或宣称已修复。当前包/基线全量生产调用比较也未重新认证,最小下一步仍由同一迁移 owner 在当前候选绑定这些原验收证据。该缺口属于 promotion 资格,不是断言当前 head 有某个已复现的新功能缺陷。
本轮不查询、派发或等待 CI;标准 premerge 通过不授予 merge 或默认采用。当前 Python/TS 局部正确性、历史性能失败及未执行的平台/打包维度分别保留。
我的整体评价
REQUEST_CHANGES — 三个遗漏 smoke 的实现 blocker 已解除,但当前完整 cutover 尚未满足原已接受的性能及当前组合资格。架构归属和大小合理,保留现在的单 TS owner,不要求无关全量迁移;需要的是原门的实证闭合,不是再加框架或更多同形测试。
持续工作和用户体验中的正确性路径获得本轮支持:停止、人工 gate、只读 monitor、已结算重放不被重启成工作;现有用户意图/授权下新增确认轮次为0。持续运行成本仍受现有性能 hold 限制,不能由源码通过证明。future-facing pass 已应用在移除重复规则和独立 handler;可在同域后续收紧 disposition 返回类型,但这不是当前新增 blocker,也不需要独立迁移项目。真实平台、安装及整条 scheduler 的剩余资格维持原 owner 和边界。
English verdict: REQUEST_CHANGES - c6300a5 fixes the three public smoke callers;377 Python/46 native tests and6 direct/19 selected checks pass. The accepted frozen performance hold remains, and old-head CLI/package receipts do not qualify this new integration. No new timing result or performance cause is claimed; keep the original thresholds and obtain current immutable qualification before accepting the cutover. CI was not consulted.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max
REQUEST_CHANGES · head c6300a5eb39d0d70d6c110049f271ec4a4d6fc11
[P2] 当前完整监控 CLI 成本仍不合格。 file/active p95 delta -294.717ms/-23.435%; file/monitor p95 delta 133.196ms/13.101%; sqlite/active p95 delta -6.020ms/-0.849%; sqlite/monitor p95 delta 63.758ms/5.897%。源码与正常安装的语义兼容已经通过,但这些实测失败阻止合并。
动机
依赖定时唤醒推进任务、并需要安全重试的用户与 Agent。 原来交互要求由原生规则生成,Python 再组装调度分类并单独请求一致性检查;两处决策需要同步维护,三个公开验证入口还停留在旧调用方式。 现在同一次原生投影返回交互要求与调度仲裁,用户继续使用原命令;运行、等待用户、监控退避、暂停及已结算重试保持原有行为,三个验证入口也恢复可运行。 不新增调度策略、配置、执行权限或存储迁移,不声称完成用户 Agent 的整体迁移、已安装 App 自动化或长期运行验收。 完整 scheduler cadence 和交互构造仍有 Python 消费者;这些实际调用迁入原生 owner 后再删除 DTO、私有组合接口和测试适配器。
原作者 hhyykk 的提案解决的是同一条真实调用链上的规则归属。此次维护者补修三个仍在使用旧接口的公开 smoke,并整合最新主干,保留原作者提交与贡献。它减少未来维护两套决策的成本;是否值得进入主干,还要单独判断完整调用路径的成本和兼容性。
改动思路
交互一致性和调度分类归现有 TS owner,Python 保留真实来源与 Host IO;无需第二个规则源、新服务或状态缓存。 本提案收敛既有交互构造与仲裁组合并迁移实际调用者;cadence、Host 效果、完整 Agent 迁移和长期采用继续由原 owner 验收。 这里的“仲裁”是判断本次应执行、等待、退避或修复的私有结果,本身没有执行或扣费权限。原先已在原生侧计算一致性,迁移后结构诊断、优先级与一致性在同一 owner 内组合,旧 Python 决策和旧一致性 RPC 删除。
| 当前 head 的源码路径说明 | 原路径 | 现路径 |
|---|---|---|
| 选定构造与提示组合 | required reads + 独立一致性请求 | 一次投影返回 reads + arbitration |
| 实际 active / human guard 的该方法族 | 3 次 | 2 次 |
| 实际首次 monitor guard 的该方法族 | 12 次 | 8 次 |
| paused / stopped;invalid context | 1;2 次 | 1;2 次 |
表格是精确 head c6300a5eb39d0d70d6c110049f271ec4a4d6fc11 的实现说明,调用数另由真实 CLI trace 验证;它不是全部 CLI RPC 数或性能结论。只修 smoke 会保留双重决策归属;新增服务或抽象层则增加成本,现有组合边界已经足够。未来向前的简化检查也做了:保留有实际消费者的 DTO 与标量 codec,未再添加重复请求作用域,当前 CLI 本来就固定同一代码版本。
具体改动
对照本次不可变基线 5c6ec1a1c3053ce41993ce2ba4598766dec67bc6 与当前 head,完整 PR 为 30 路径,+840/−252;生产 9 路径 +155/−196,净 −41;验证和配置 19 路径 +656/−56;双语 RFC 2 路径 +29/−0。删除的 139 行是三个 Python 定义的跨度,包含签名、文档和 codec,不能说成 139 行纯规则。没有提交生成包、原始日志或私有材料。
相对上次评审,三个公开 smoke 的原断言全部保留。状态机使用生产中的 contract/arbitration 组合,两个 scheduler smoke 把已有声明式 contract 交给同一原生投影,再把同一结果用于 compact、detail 和 quota wrapper;没有恢复 Python 仲裁器或把断言换成当前输出。主干整合同时保留完整 Goal topology、replan 和本次 required-read 的两侧 snapshot 注册,未把主干改动计入提案净 diff。
关键代码讲解
-
schedulerDisposition:按原有顺序处理终止、用户阻塞、监控、重放和工作前沿;低层 should_run 不能覆盖最终交互通道。 -
projectSchedulerArbitration:先积累结构诊断,再复用一致性内核;非法布尔值不会转成执行权限,矛盾通道仍返回修复诊断。 -
_interaction_reads_and_arbitration:Python 收集真实来源与完整读取要求,一次交给现有原生接口;64 KiB 选择复用完整私有通道,不截断内容。 -
_build_interaction_contract_projection:最终 contract 与它对应的仲裁结果一起返回;仍有实际调用者的 dict facade 保留,避免第二次推导。 -
build_scheduler_hint:消费已经生成的仲裁,继续渲染原 Host 节奏、等待和停止建议;缺失仲裁拒绝,非法执行上下文仍走原修复分支。
规格依据是 docs/architecture/rfcs/typescript-control-plane-migration-v0.md,已接受版本 5c6ec1a1c3053ce41993ce2ba4598766dec67bc6,不是候选 PR 自己新增的 checkpoint。§2.4:已落实单 owner 替换,兼容 facade 只服务仍在使用的调用;§5:已披露删除、桥接、方法族计数、净生产体积和退出条件;§6:完整语义、正常分发安装、负例和恢复已验证,性能资格仍未全部满足,不能晋级。
当前 402 项 Python 验证、63 项原生验证及三个原 smoke 通过;不把重叠阶段的数字相加。源码与正常 wheel、sdist 的 9 个生产文件和 37 个编译前端文件逐字节一致。原公开 fixture 与 functional harness 均未改:File/SQLite × 六类场景 × base/source/wheel/sdist 共 48 行,全量公开输出、canonical revision/Todos/leases、持久域值和路径集合一致,每次冷重启均验证 PID 改变。只处理已核验的锁 owner PID 和 JSON 键序,没有删除诊断、命令、作用域或身份字段。
在正常 wheel 的独立副本中,把 active_work 物理改成 quiet_wait,同一个完整 CLI harness 会在“活跃工作必须 run_now”的独立断言失败;原源码和正常包未改。正常 sdist 的真实 SQLite 又验证了同一 Goal/Agent/Todo/Turn 从缺少上下文的修复提示,补齐后恢复 run_now,registry、状态和 canonical authority 均未改,也没有新增设置或确认。active 路径真实执行 refresh/spend 后,冷重启重放不再扣费。
对主干的风险
最容易被纯函数测试掩盖的是:公开调用没迁移、大输入或生成输出越过普通帧、或者完整首次监控链比微基准慢。已执行实际入口与这些边界:64 KiB 前后、接近普通帧上限、较小输入产生大回复、错误序列化、native 拒绝和临时私有文件清理。普通 2 MiB 与私有 64 MiB 限制未放宽;缺少或非法 bool 不会被转换成执行权限,矛盾通道仍产生原一致性修复诊断。完整公开文本比较覆盖来源、读取顺序、必做/可选、等待释放、停止与结算,而不只比较 reason code。
成本使用本次当前主干整合版本的一次固定对照,每条 File/SQLite active/monitor 各 64 对交替完整 CLI,零删样、零为了转绿而重跑。覆盖首次处理链,逐次检查完整公开与持久结果;记录稳定 native PID、零计时内启动以及实际方法族调用数。单独的 16/128/256 冷启动、热事务和突发内存观察不代替完整 CLI。当前 head 四组原生热事务 p95 为 0.521 / 0.479 / 0.529 / 0.434 ms,均低于 2 ms;legacy File/monitor 的 2.598 ms 仍如实保留。SQLite/monitor 冷启动 p95 从 143.202 到 202.329 ms 的增加也单列披露;宏观计时内零启动,因此未把它用作尾延迟原因。内存是 macOS ps 的 idle/burst RSS,无 HWM 或强制 GC。当前 File 与 SQLite 的完整监控 CLI 均超出原门,维持 REQUEST_CHANGES。
| 路径 | 完整 CLI p95 base → head,ms | 变化 | 原门 |
|---|---|---|---|
| file/active | 1257.596 → 962.879 | -294.717 ms;-23.435% | 通过 |
| file/monitor | 1016.655 → 1149.851 | +133.196 ms;+13.101% | Hold |
| sqlite/active | 709.027 → 703.007 | -6.020 ms;-0.849% | 通过 |
| sqlite/monitor | 1081.231 → 1144.989 | +63.758 ms;+5.897% | Hold |
历史 V4 的 File/monitor +26.412671 ms 和 V5 的 SQLite/monitor +8.447648% / +178.672962 ms 仍按原版本保留,详见原证据。当前新主干/主机的独立资格不能证明历史原因或宣称修复了 Linux。早期 warm-monitor 重放采样也未当作完整首次监控成本证据。正常打包曾因旧前端产物过期失败,重建后正常打包/安装通过,没有绕过校验。
已执行 6 个 direct 与 19 个风险选择源码检查,源码执行项没有失败;原生 CQR 与合并准备度仍需在当前最终证据上回读。按 policy revision 21 的 wait_for_ci=false,未查询、轮询或等待 CI。没有声明已安装 App、外部自动化、真实模型、Windows、PostgreSQL或长期 fleet 验收;前端源码交互未变,正常包完整性不代替这些未测旅程。
我的整体评价
长期续跑与恢复行为在这个有界变更内保持:等待有原释放条件,拒绝后可以在原授权边界纠正,同一 Turn 的已结算结果不会重复执行或扣费。用户仍使用原有命令和安装方式,不需要补填已知信息或新增确认。当前 File 与 SQLite 的完整监控 CLI 均超出原门,维持 REQUEST_CHANGES。 当前整体仍不能合并;缺口是当前要求的成本资格,不是三处调用迁移仍有错误。
此提案复用现有 disposition/mode 语义;advisory 只提示 existing method 加入私有 snapshot allowlist,Python/TS 两端保持对称,完整语义检查随后通过。没有新业务 vocabulary、额外配置、缓存或执行框架。实际 Python hint、dict-only construction 和 Host IO 仍有消费者,后续按既有迁移路线退役;本 PR 不抢占完整 Agent 迁移的产品验收。该维护者同时做了此次小范围补修和评审,不把它包装成独立 reviewer。
English verdict: REQUEST_CHANGES. All three public smoke consumers are repaired without weakening assertions. Current source and normal-package full CLI semantics, private transport negatives, physical mutation sensitivity and installed same-Turn recovery are verified. Current required full-CLI/native cost qualification remains incomplete or failed; hold merge. Historical failures remain at their original revisions; no untested platform or full Agent-migration acceptance is claimed.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max
APPROVE · head 70d6a03c6407a9ee47a997535e0baa3aeaa53ad9
动机
依赖定时唤醒推进任务、并需要安全重试的用户与 Agent。 原来交互要求由原生规则生成,Python 再组装调度分类并单独请求一致性检查;两处决策需要同步维护,三个公开验证入口还停留在旧调用方式。 现在同一次原生投影返回交互要求与调度仲裁,用户继续使用原命令;运行、等待用户、监控退避、暂停及已结算重试保持原有行为,三个验证入口也恢复可运行。 不新增调度策略、配置、执行权限或存储迁移,不声称完成用户 Agent 的整体迁移、已安装 App 自动化或长期运行验收。 完整 scheduler cadence 和交互构造仍有 Python 消费者;这些实际调用迁入原生 owner 后再删除 DTO、私有组合接口和测试适配器。
原作者 hhyykk 的提案解决的是同一条真实调用链上的规则归属。此次维护者补修三个仍在使用旧接口的公开 smoke,并整合最新主干,保留原作者提交与贡献。它减少未来维护两套决策的成本;是否值得进入主干,还要单独判断完整调用路径的成本和兼容性。
本次按维护者明确的默认 SQLite 性能范围判断默认交付,仓库规则同步提案为 #6763,目前未声称已合并。原 2 ms、5% 与 25 ms 门槛保留;File 的功能、安全和恢复仍验收,性能未在本轮重测或获资格。旧失败保留原版本与原条件,这不是把原冻结实验改成通过。
改动思路
交互一致性和调度分类归现有 TS owner,Python 保留真实来源与 Host IO;无需第二个规则源、新服务或状态缓存。 本提案收敛既有交互构造与仲裁组合并迁移实际调用者;cadence、Host 效果、完整 Agent 迁移和长期采用继续由原 owner 验收。 这里的“仲裁”是判断本次应执行、等待、退避或修复的私有结果,本身没有执行或扣费权限。原先已在原生侧计算一致性,迁移后结构诊断、优先级与一致性在同一 owner 内组合,旧 Python 决策和旧一致性 RPC 删除。
| 当前 head 的源码路径说明 | 原路径 | 现路径 |
|---|---|---|
| 选定构造与提示组合 | required reads + 独立一致性请求 | 一次投影返回 reads + arbitration |
| 实际 active / human guard 的该方法族 | 3 次 | 2 次 |
| 实际首次 monitor guard 的该方法族 | 12 次 | 8 次 |
| paused / stopped;invalid context | 1;2 次 | 1;2 次 |
表格是精确 head 70d6a03c6407a9ee47a997535e0baa3aeaa53ad9 的实现说明,调用数另由真实 CLI trace 验证;它不是全部 CLI RPC 数或性能结论。只修 smoke 会保留双重决策归属;新增服务或抽象层则增加成本,现有组合边界已经足够。未来向前的简化检查也做了:保留有实际消费者的 DTO 与标量 codec,未再添加重复请求作用域,当前 CLI 本来就固定同一代码版本。
具体改动
对照本次不可变基线 84dfa63c26a6b03a3c5e6039108f1540e8b2b1bb 与当前 head,完整 PR 为 30 路径,+840/−252;生产 9 路径 +155/−196,净 −41;验证和配置 19 路径 +656/−56;双语 RFC 2 路径 +29/−0。删除的 139 行是三个 Python 定义的跨度,包含签名、文档和 codec,不能说成 139 行纯规则。没有提交生成包、原始日志或私有材料。
相对上次评审,三个公开 smoke 的原断言全部保留。状态机使用生产中的 contract/arbitration 组合,两个 scheduler smoke 把已有声明式 contract 交给同一原生投影,再把同一结果用于 compact、detail 和 quota wrapper;没有恢复 Python 仲裁器或把断言换成当前输出。主干整合同时保留完整 Goal topology、replan 和本次 required-read 的两侧 snapshot 注册,未把主干改动计入提案净 diff。
关键代码讲解
-
schedulerDisposition:按原有顺序处理终止、用户阻塞、监控、重放和工作前沿;低层 should_run 不能覆盖最终交互通道。 -
projectSchedulerArbitration:先积累结构诊断,再复用一致性内核;非法布尔值不会转成执行权限,矛盾通道仍返回修复诊断。 -
_interaction_reads_and_arbitration:Python 收集真实来源与完整读取要求,一次交给现有原生接口;64 KiB 选择复用完整私有通道,不截断内容。 -
_build_interaction_contract_projection:最终 contract 与它对应的仲裁结果一起返回;仍有实际调用者的 dict facade 保留,避免第二次推导。 -
build_scheduler_hint:消费已经生成的仲裁,继续渲染原 Host 节奏、等待和停止建议;缺失仲裁拒绝,非法执行上下文仍走原修复分支。
规格依据是 docs/architecture/rfcs/typescript-control-plane-migration-v0.md,已接受版本 84dfa63c26a6b03a3c5e6039108f1540e8b2b1bb,不是候选 PR 自己新增的 checkpoint。§2.4:已落实单 owner 替换,兼容 facade 只服务仍在使用的调用;§5:已披露删除、桥接、方法族计数、净生产体积和退出条件;§6:完整语义、正常分发安装、负例和恢复已验证,性能资格已在当前主机满足,但不扩大为其他平台或完整采用证明。
当前 402 项 Python 验证、63 项原生验证及三个原 smoke 通过;不把重叠阶段的数字相加。源码与正常 wheel、sdist 的 9 个生产文件和 37 个编译前端文件逐字节一致。原公开 fixture 与 functional harness 均未改:File/SQLite × 六类场景 × base/source/wheel/sdist 共 48 行,全量公开输出、canonical revision/Todos/leases、持久域值和路径集合一致,每次冷重启均验证 PID 改变。只处理已核验的锁 owner PID 和 JSON 键序,没有删除诊断、命令、作用域或身份字段。
在正常 wheel 的独立副本中,把 active_work 物理改成 quiet_wait,同一个完整 CLI harness 会在“活跃工作必须 run_now”的独立断言失败;原源码和正常包未改。正常 sdist 的真实 SQLite 又验证了同一 Goal/Agent/Todo/Turn 从缺少上下文的修复提示,补齐后恢复 run_now,registry、状态和 canonical authority 均未改,也没有新增设置或确认。active 路径真实执行 refresh/spend 后,冷重启重放不再扣费。
对主干的风险
最容易被纯函数测试掩盖的是:公开调用没迁移、大输入或生成输出越过普通帧、或者完整首次监控链比微基准慢。已执行实际入口与这些边界:64 KiB 前后、接近普通帧上限、较小输入产生大回复、错误序列化、native 拒绝和临时私有文件清理。普通 2 MiB 与私有 64 MiB 限制未放宽;缺少或非法 bool 不会被转换成执行权限,矛盾通道仍产生原一致性修复诊断。完整公开文本比较覆盖来源、读取顺序、必做/可选、等待释放、停止与结算,而不只比较 reason code。
成本使用本次当前主干整合版本的一次固定对照,仅默认 SQLite 的 active/monitor 两条各 64 对交替完整 CLI,零删样、零为了转绿而重跑。覆盖首次处理链,逐次检查完整公开与持久结果;记录稳定 native PID、零计时内启动以及实际方法族调用数。单独的 16/128/256 冷启动、热事务和突发内存观察不代替完整 CLI。当前候选两条热事务均低于 2 ms;SQLite/active: warm p95 0.739750→0.717833 ms,cold runtime ping p95 149.937→248.831 ms,候选 RSS 86.02→90.02 MiB;SQLite/monitor: warm p95 0.898583→0.710500 ms,cold runtime ping p95 165.559→195.355 ms,候选 RSS 85.72→87.34 MiB。cold 是 runtime ping/启动而非完整 CLI,warm 不含 provider IO 和代码发现;它们仍由完整 CLI 承担。内存是 macOS ps 的 idle/burst RSS,无 HWM 或强制 GC。当前默认 SQLite 的 active 与 fresh-monitor 完整 CLI 及候选原生热事务满足原门。
| 路径 | 完整 CLI p95 base → head,ms | 变化 | 原门 |
|---|---|---|---|
| sqlite/active | 894.328 → 856.231 | -38.096 ms;-4.260% | 通过 |
| sqlite/monitor | 1111.173 → 1084.258 | -26.914 ms;-2.422% | 通过 |
历史 V4 的 File/monitor +26.412671 ms 和 V5 的 SQLite/monitor +8.447648% / +178.672962 ms 仍按原版本保留,详见原证据。此前 c6300a5 组合的 SQLite/monitor +63.758167 ms / +5.896812% 同样保留为旧失败。当前新主干/主机的独立资格不能证明这些历史原因或宣称修复了 Linux。当前 SQLite active 中位数增加 19.755375 ms,因此不声称全场景都变快。早期 warm-monitor 重放采样也未当作完整首次监控成本证据。正常打包曾因旧前端产物过期失败,重建后正常打包/安装通过,没有绕过校验。
已执行 6 个 direct 与 19 个风险选择源码检查,源码执行项没有失败;当前精确范围 CQR 和完整 premerge gate 均已回读通过,无 source/policy failure 或 manual hold;合并准备度仍是单独的最后条件。按 policy revision 21 的 wait_for_ci=false,未查询、轮询或等待 CI。没有声明已安装 App、外部自动化、真实模型、Windows、PostgreSQL或长期 fleet 验收;前端源码交互未变,正常包完整性不代替这些未测旅程。
我的整体评价
长期续跑与恢复行为在这个有界变更内保持:等待有原释放条件,拒绝后可以在原授权边界纠正,同一 Turn 的已结算结果不会重复执行或扣费。用户仍使用原有命令和安装方式,不需要补填已知信息或新增确认。当前默认 SQLite 的 active 与 fresh-monitor 完整 CLI 及候选原生热事务满足原门。 当前证据支持这个单 owner 的有界收敛,保留历史失败和主机差异作为残余风险。
此提案复用现有 disposition/mode 语义;advisory 只提示 existing method 加入私有 snapshot allowlist,Python/TS 两端保持对称,完整语义检查随后通过。没有新业务 vocabulary、额外配置、缓存或执行框架。实际 Python hint、dict-only construction 和 Host IO 仍有消费者,后续按既有迁移路线退役;本 PR 不抢占完整 Agent 迁移的产品验收。该维护者同时做了此次小范围补修和评审,不把它包装成独立 reviewer。
English verdict: APPROVE. All three public smoke consumers are repaired without weakening assertions. Current source and normal-package full CLI semantics, private transport negatives, physical mutation sensitivity and installed same-Turn recovery are verified. The current default-SQLite full-CLI and native cost gates pass; File performance is not qualified. Historical failures remain at their original revisions; no untested platform or full Agent-migration acceptance is claimed.
The existing quota guard constructs required reads, then separately composes Python scheduler arbitration and a native consistency check. This PR places structural diagnostics, precedence and consistency in the existing TypeScript interaction owner and returns arbitration with the existing read projection. Existing guard, wait, repair, settlement and replay behavior is preserved.
Maintainer repairs preserve @hhyykk's proposal and commits, migrate three public smoke consumers without weakening their assertions, and integrate main while retaining both sides of complete-snapshot registration. No new runtime, RPC, setting, cache, provider default or execution grant is introduced.
Current technical conclusion: APPROVE for this bounded refactor and default SQLite qualification. Head
70d6a03c6407a9ee47a997535e0baa3aeaa53ad9, baseline84dfa63c26a6b03a3c5e6039108f1540e8b2b1bb. GitHub approval and exact-head merge readiness remain separate conditions.Specification and qualification scope
The accepted pre-change TypeScript migration RFC supplies §§2.4/5/6: one decision owner, migration economics, full caller semantics, normal packages and representative cost. The maintainer explicitly selected existing default SQLite for default-delivery performance; #6763 proposes the matching repository guidance. The 2 ms native and 5%/25 ms full-CLI targets are unchanged.
All affected File correctness, data integrity, safety and recovery remain required and pass. Current File performance was not rerun or qualified. The original V3/V4/V5 failures and the prior
c6300a5integration's SQLite/monitor +63.758167 ms/+5.896812% remain at their original revisions and criteria. This current qualification neither rewrites those experiments nor proves their root cause or a Linux repair.Migration economics
work_items/interaction_contract.tsowns structural diagnostics, consistency and disposition; Python retains source IO, scalar codecs and Host/cadence rendering_required_bool,_classify_disposition,build_scheduler_arbitration; this includes signatures, docs and codecs. Separate mapping helper and old consistency wire handler also removedCurrent validation
macOS, Python 3.14.8, Node 24.21.0; isolated synthetic File/SQLite state and normal installations:
active_work→quiet_waitmutation in a separate current normal-wheel copy fails the same real-CLI active-run invariant. The normal package remains unchanged.wait_for_ci=false.Default SQLite performance
One current-main integration run: 64 alternating matched pairs per row, 256 timed complete CLI calls, no trimming or retries. The full fresh-monitor chain is exercised with complete public/durable equality, stable native PIDs and zero timed startups.
Active p50 rises by 19.755375 ms, so this is not a universal speedup claim. Four fresh native base/head × active/monitor profiles each include 16 cold runtime starts, 128 warm transactions and 256 burst transactions. Candidate warm p95 is 0.717833/0.710500 ms, below 2 ms. Native measurements exclude provider IO and executable discovery; the complete CLI comparison includes those costs and remains decisive.
Current performance scope is default SQLite. File functional acceptance passes; no File performance approval or whole-provider promotion is claimed. Historical failures stay visible.
Review and continuation
Current exact-head review: APPROVE. It includes maintainer patch self-review and does not claim a separate independent reviewer. Original contributor commits and DCO trailers are retained.
This completes the existing construction/arbitration slice. It does not close whole-scheduler migration, installed App/external automation, real-model adoption, Windows/PostgreSQL execution, sustained fleet qualification or complete user-Agent migration. Existing frontend operations are unchanged; normal package verification does not substitute for those untested journeys.