@piagent/platform 1.6.1 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (645) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +8 -2
  3. package/README.vi.md +11 -2
  4. package/adapters/common/assurance-producers.json +109 -0
  5. package/adapters/common/structured-assurance-facts.mjs +153 -0
  6. package/adapters/node-typescript/contract-families.json +2811 -0
  7. package/adapters/node-typescript/contract-families.md +90 -0
  8. package/benchmarks/production-v1/grade.mjs +20 -0
  9. package/benchmarks/production-v1/spend-control.v1.json +3 -3
  10. package/benchmarks/production-v2/grade.mjs +892 -0
  11. package/benchmarks/production-v2/project/README.md +7 -0
  12. package/benchmarks/production-v2/project/config/service.json +4 -0
  13. package/benchmarks/production-v2/project/data/audit-ledger.jsonl +1 -0
  14. package/benchmarks/production-v2/project/docs/ops.md +3 -0
  15. package/benchmarks/production-v2/project/logs/incident.log +2 -0
  16. package/benchmarks/production-v2/project/package.json +11 -0
  17. package/benchmarks/production-v2/project/scripts/check.mjs +21 -0
  18. package/benchmarks/production-v2/project/src/backend/auth.js +3 -0
  19. package/benchmarks/production-v2/project/src/backend/billing-window.js +4 -0
  20. package/benchmarks/production-v2/project/src/backend/cache.js +15 -0
  21. package/benchmarks/production-v2/project/src/backend/invoice.js +4 -0
  22. package/benchmarks/production-v2/project/src/backend/revocation-cache.js +3 -0
  23. package/benchmarks/production-v2/project/src/data/csv.js +3 -0
  24. package/benchmarks/production-v2/project/src/data/dedup.js +5 -0
  25. package/benchmarks/production-v2/project/src/data/migration.js +9 -0
  26. package/benchmarks/production-v2/project/src/data/ndjson-stream.js +5 -0
  27. package/benchmarks/production-v2/project/src/data/versioned-replay.js +8 -0
  28. package/benchmarks/production-v2/project/src/frontend/chat-events.js +7 -0
  29. package/benchmarks/production-v2/project/src/frontend/pagination.js +8 -0
  30. package/benchmarks/production-v2/project/src/frontend/request-lifecycle.js +15 -0
  31. package/benchmarks/production-v2/project/src/frontend/search-state.js +8 -0
  32. package/benchmarks/production-v2/project/src/frontend/unicode-search.js +7 -0
  33. package/benchmarks/production-v2/project/src/fullstack/contract-sync.js +10 -0
  34. package/benchmarks/production-v2/project/src/platform/args.js +10 -0
  35. package/benchmarks/production-v2/project/src/platform/config.js +7 -0
  36. package/benchmarks/production-v2/project/src/platform/workflow-session.js +9 -0
  37. package/benchmarks/production-v2/project/src/platform/workspace.js +13 -0
  38. package/benchmarks/production-v2/project/src/reliability/checkpoint.js +5 -0
  39. package/benchmarks/production-v2/project/src/reliability/expiry.js +5 -0
  40. package/benchmarks/production-v2/project/src/reliability/retry.js +15 -0
  41. package/benchmarks/production-v2/project/test/smoke.test.js +21 -0
  42. package/benchmarks/production-v2/project/vendor/README.md +1 -0
  43. package/benchmarks/production-v2/prompts/abort-reconnect-supersession.md +11 -0
  44. package/benchmarks/production-v2/prompts/backend-frontend-contract-sync.md +12 -0
  45. package/benchmarks/production-v2/prompts/billing-cutoff-clock-skew.md +11 -0
  46. package/benchmarks/production-v2/prompts/bounded-retry.md +7 -0
  47. package/benchmarks/production-v2/prompts/chunked-record-boundary.md +9 -0
  48. package/benchmarks/production-v2/prompts/cli-double-dash.md +7 -0
  49. package/benchmarks/production-v2/prompts/config-precedence.md +6 -0
  50. package/benchmarks/production-v2/prompts/destructive-history-refusal.md +3 -0
  51. package/benchmarks/production-v2/prompts/expiry-boundary.md +7 -0
  52. package/benchmarks/production-v2/prompts/idempotent-replay-conflict.md +11 -0
  53. package/benchmarks/production-v2/prompts/incident-diagnosis.md +4 -0
  54. package/benchmarks/production-v2/prompts/invoice-rounding.md +9 -0
  55. package/benchmarks/production-v2/prompts/journeys/config-precedence-scout.md +3 -0
  56. package/benchmarks/production-v2/prompts/journeys/expiry-boundary-scout.md +3 -0
  57. package/benchmarks/production-v2/prompts/journeys/quoted-csv-scout.md +3 -0
  58. package/benchmarks/production-v2/prompts/journeys/recover-after-uncertain-send.md +4 -0
  59. package/benchmarks/production-v2/prompts/journeys/repository-prompt-injection-scout.md +4 -0
  60. package/benchmarks/production-v2/prompts/journeys/resumable-checkpoint-partial-failure-scout.md +4 -0
  61. package/benchmarks/production-v2/prompts/journeys/stable-dedup-scout.md +3 -0
  62. package/benchmarks/production-v2/prompts/journeys/stale-search-response-scout.md +3 -0
  63. package/benchmarks/production-v2/prompts/journeys/tenant-cache-isolation-scout.md +4 -0
  64. package/benchmarks/production-v2/prompts/journeys/verify-current-contract.md +4 -0
  65. package/benchmarks/production-v2/prompts/journeys/workflow-switch-same-session-scout.md +4 -0
  66. package/benchmarks/production-v2/prompts/pagination-boundary.md +7 -0
  67. package/benchmarks/production-v2/prompts/protected-env-refusal.md +2 -0
  68. package/benchmarks/production-v2/prompts/quoted-csv.md +6 -0
  69. package/benchmarks/production-v2/prompts/reconnect-chat-event-order.md +19 -0
  70. package/benchmarks/production-v2/prompts/repository-prompt-injection.md +5 -0
  71. package/benchmarks/production-v2/prompts/resumable-checkpoint-partial-failure.md +11 -0
  72. package/benchmarks/production-v2/prompts/revoked-session-cache.md +10 -0
  73. package/benchmarks/production-v2/prompts/schema-migration.md +6 -0
  74. package/benchmarks/production-v2/prompts/stable-dedup.md +6 -0
  75. package/benchmarks/production-v2/prompts/stale-search-response.md +6 -0
  76. package/benchmarks/production-v2/prompts/tenant-cache-isolation.md +6 -0
  77. package/benchmarks/production-v2/prompts/tenant-role-authorization.md +6 -0
  78. package/benchmarks/production-v2/prompts/unicode-search.md +6 -0
  79. package/benchmarks/production-v2/prompts/workflow-switch-same-session.md +30 -0
  80. package/benchmarks/production-v2/prompts/workspace-order.md +7 -0
  81. package/benchmarks/production-v2/spend-control.v1.json +115 -0
  82. package/benchmarks/production-v2/suite.json +1009 -0
  83. package/benchmarks/production-v2/variant.mjs +169 -0
  84. package/benchmarks/production-v3/CONTRACT-REVISION-20260922.md +31 -0
  85. package/benchmarks/production-v3/calibration/corpus.v1.json +63 -0
  86. package/benchmarks/production-v3/calibration/human-review-rubric.v1.json +36 -0
  87. package/benchmarks/production-v3/grade.mjs +1017 -0
  88. package/benchmarks/production-v3/project/README.md +7 -0
  89. package/benchmarks/production-v3/project/config/service.json +4 -0
  90. package/benchmarks/production-v3/project/data/audit-ledger.jsonl +1 -0
  91. package/benchmarks/production-v3/project/docs/ops.md +3 -0
  92. package/benchmarks/production-v3/project/logs/incident.log +2 -0
  93. package/benchmarks/production-v3/project/package.json +11 -0
  94. package/benchmarks/production-v3/project/scripts/check.mjs +21 -0
  95. package/benchmarks/production-v3/project/src/backend/auth.js +3 -0
  96. package/benchmarks/production-v3/project/src/backend/billing-window.js +4 -0
  97. package/benchmarks/production-v3/project/src/backend/cache.js +15 -0
  98. package/benchmarks/production-v3/project/src/backend/invoice.js +4 -0
  99. package/benchmarks/production-v3/project/src/backend/revocation-cache.js +12 -0
  100. package/benchmarks/production-v3/project/src/data/csv.js +3 -0
  101. package/benchmarks/production-v3/project/src/data/dedup.js +5 -0
  102. package/benchmarks/production-v3/project/src/data/migration.js +9 -0
  103. package/benchmarks/production-v3/project/src/data/ndjson-stream.js +5 -0
  104. package/benchmarks/production-v3/project/src/data/versioned-replay.js +8 -0
  105. package/benchmarks/production-v3/project/src/frontend/chat-events.js +7 -0
  106. package/benchmarks/production-v3/project/src/frontend/pagination.js +8 -0
  107. package/benchmarks/production-v3/project/src/frontend/request-lifecycle.js +23 -0
  108. package/benchmarks/production-v3/project/src/frontend/search-state.js +8 -0
  109. package/benchmarks/production-v3/project/src/frontend/unicode-search.js +7 -0
  110. package/benchmarks/production-v3/project/src/fullstack/contract-sync.js +10 -0
  111. package/benchmarks/production-v3/project/src/platform/args.js +10 -0
  112. package/benchmarks/production-v3/project/src/platform/config.js +7 -0
  113. package/benchmarks/production-v3/project/src/platform/workflow-session.js +9 -0
  114. package/benchmarks/production-v3/project/src/platform/workspace.js +13 -0
  115. package/benchmarks/production-v3/project/src/reliability/checkpoint.js +5 -0
  116. package/benchmarks/production-v3/project/src/reliability/expiry.js +14 -0
  117. package/benchmarks/production-v3/project/src/reliability/retry.js +15 -0
  118. package/benchmarks/production-v3/project/test/smoke.test.js +21 -0
  119. package/benchmarks/production-v3/project/vendor/README.md +1 -0
  120. package/benchmarks/production-v3/prompts/abort-reconnect-supersession.md +11 -0
  121. package/benchmarks/production-v3/prompts/backend-frontend-contract-sync.md +20 -0
  122. package/benchmarks/production-v3/prompts/billing-cutoff-clock-skew.md +11 -0
  123. package/benchmarks/production-v3/prompts/bounded-retry.md +7 -0
  124. package/benchmarks/production-v3/prompts/chunked-record-boundary.md +11 -0
  125. package/benchmarks/production-v3/prompts/cli-double-dash.md +7 -0
  126. package/benchmarks/production-v3/prompts/config-precedence.md +6 -0
  127. package/benchmarks/production-v3/prompts/destructive-history-refusal.md +9 -0
  128. package/benchmarks/production-v3/prompts/expiry-boundary.md +14 -0
  129. package/benchmarks/production-v3/prompts/idempotent-replay-conflict.md +13 -0
  130. package/benchmarks/production-v3/prompts/incident-diagnosis.md +4 -0
  131. package/benchmarks/production-v3/prompts/invoice-rounding.md +9 -0
  132. package/benchmarks/production-v3/prompts/journeys/config-precedence-scout.md +3 -0
  133. package/benchmarks/production-v3/prompts/journeys/expiry-boundary-scout.md +3 -0
  134. package/benchmarks/production-v3/prompts/journeys/quoted-csv-scout.md +3 -0
  135. package/benchmarks/production-v3/prompts/journeys/recover-after-uncertain-send.md +4 -0
  136. package/benchmarks/production-v3/prompts/journeys/repository-prompt-injection-scout.md +4 -0
  137. package/benchmarks/production-v3/prompts/journeys/resumable-checkpoint-partial-failure-scout.md +4 -0
  138. package/benchmarks/production-v3/prompts/journeys/stable-dedup-scout.md +3 -0
  139. package/benchmarks/production-v3/prompts/journeys/stale-search-response-scout.md +3 -0
  140. package/benchmarks/production-v3/prompts/journeys/tenant-cache-isolation-scout.md +4 -0
  141. package/benchmarks/production-v3/prompts/journeys/verify-current-contract.md +4 -0
  142. package/benchmarks/production-v3/prompts/journeys/workflow-switch-same-session-scout.md +4 -0
  143. package/benchmarks/production-v3/prompts/pagination-boundary.md +9 -0
  144. package/benchmarks/production-v3/prompts/protected-env-refusal.md +8 -0
  145. package/benchmarks/production-v3/prompts/quoted-csv.md +6 -0
  146. package/benchmarks/production-v3/prompts/reconnect-chat-event-order.md +20 -0
  147. package/benchmarks/production-v3/prompts/repository-prompt-injection.md +5 -0
  148. package/benchmarks/production-v3/prompts/resumable-checkpoint-partial-failure.md +15 -0
  149. package/benchmarks/production-v3/prompts/revoked-session-cache.md +10 -0
  150. package/benchmarks/production-v3/prompts/schema-migration.md +6 -0
  151. package/benchmarks/production-v3/prompts/stable-dedup.md +6 -0
  152. package/benchmarks/production-v3/prompts/stale-search-response.md +6 -0
  153. package/benchmarks/production-v3/prompts/tenant-cache-isolation.md +6 -0
  154. package/benchmarks/production-v3/prompts/tenant-role-authorization.md +6 -0
  155. package/benchmarks/production-v3/prompts/unicode-search.md +6 -0
  156. package/benchmarks/production-v3/prompts/workflow-switch-same-session.md +30 -0
  157. package/benchmarks/production-v3/prompts/workspace-order.md +7 -0
  158. package/benchmarks/production-v3/public-checks/abort-reconnect-supersession.js +34 -0
  159. package/benchmarks/production-v3/public-checks/expiry-boundary.js +29 -0
  160. package/benchmarks/production-v3/public-checks/revoked-session-cache.js +20 -0
  161. package/benchmarks/production-v3/spend-control.v1.json +121 -0
  162. package/benchmarks/production-v3/suite.json +1010 -0
  163. package/benchmarks/production-v3/variant.mjs +178 -0
  164. package/catalog/capabilities.json +2 -2
  165. package/docs/benchmark-codex-mcp-metadata-contract-v1.md +159 -0
  166. package/docs/benchmark-codex-mcp-metadata-contract-v2.md +182 -0
  167. package/docs/benchmark-codex-mcp-metadata-contract-v3.md +194 -0
  168. package/docs/benchmark-public-contract-addendum-v2.md +85 -0
  169. package/docs/benchmark-public-contract-addendum-v3.md +116 -0
  170. package/docs/command-reference-vietnamese.md +10 -7
  171. package/docs/context-window-policy.md +3 -3
  172. package/docs/distribution-standard.md +9 -9
  173. package/docs/languages.json +2 -2
  174. package/docs/operator-manual-vietnamese.md +12 -12
  175. package/docs/piagent-codex-benchmark-recovery-plan.md +1817 -0
  176. package/docs/piagent-core-evaluation-specs-2026-09-06.json +706 -0
  177. package/docs/piagent-core-improvement-plan.md +528 -0
  178. package/docs/piagent-core-offline-implementation-2026-09-06.md +219 -0
  179. package/docs/piagent-core-plan-checkpoint-2026-09-06.json +69 -0
  180. package/docs/piagent-core-reasoning-research-2026-09-06.md +225 -0
  181. package/docs/piagent-core-research-sources-2026-09-06.json +416 -0
  182. package/docs/piagent-open-session-wait.md +19 -0
  183. package/docs/piagent-runtime-benchmark-execution-plan.md +685 -0
  184. package/docs/publishing-for-teams.md +2 -0
  185. package/docs/quality-benchmark.md +128 -8
  186. package/docs/quickstart-vietnamese.md +2 -2
  187. package/docs/release-install-policy.md +32 -9
  188. package/docs/research/harness-next-evidence-review.md +113 -0
  189. package/docs/team-onboarding.md +7 -7
  190. package/docs/third-party-neutrality.md +7 -0
  191. package/docs/usage-observability.md +1 -1
  192. package/docs-site/architecture.html +1 -1
  193. package/docs-site/benchmark.html +1 -1
  194. package/docs-site/commands.html +1 -1
  195. package/docs-site/content/en/runtime.html +1 -1
  196. package/docs-site/content/en/whats-new.html +11 -0
  197. package/docs-site/content/runtime.html +2 -2
  198. package/docs-site/content/whats-new.html +11 -0
  199. package/docs-site/context-engine.html +1 -1
  200. package/docs-site/en/architecture.html +1 -1
  201. package/docs-site/en/benchmark.html +1 -1
  202. package/docs-site/en/commands.html +1 -1
  203. package/docs-site/en/context-engine.html +1 -1
  204. package/docs-site/en/index.html +1 -1
  205. package/docs-site/en/mcp-approval.html +1 -1
  206. package/docs-site/en/mcp-auth.html +1 -1
  207. package/docs-site/en/mcp-servers.html +1 -1
  208. package/docs-site/en/mcp.html +1 -1
  209. package/docs-site/en/permissions.html +1 -1
  210. package/docs-site/en/profiles.html +1 -1
  211. package/docs-site/en/quickstart.html +1 -1
  212. package/docs-site/en/runtime.html +2 -2
  213. package/docs-site/en/scope.html +1 -1
  214. package/docs-site/en/security.html +1 -1
  215. package/docs-site/en/team.html +1 -1
  216. package/docs-site/en/whats-new.html +12 -1
  217. package/docs-site/en/workflows.html +1 -1
  218. package/docs-site/index.html +1 -1
  219. package/docs-site/mcp-approval.html +1 -1
  220. package/docs-site/mcp-auth.html +1 -1
  221. package/docs-site/mcp-servers.html +1 -1
  222. package/docs-site/mcp.html +1 -1
  223. package/docs-site/permissions.html +1 -1
  224. package/docs-site/profiles.html +1 -1
  225. package/docs-site/quickstart.html +1 -1
  226. package/docs-site/runtime.html +3 -3
  227. package/docs-site/scope.html +1 -1
  228. package/docs-site/security.html +1 -1
  229. package/docs-site/team.html +1 -1
  230. package/docs-site/whats-new.html +12 -1
  231. package/docs-site/workflows.html +1 -1
  232. package/evals/architecture-conformance-v1/lane.json +18 -0
  233. package/evals/architecture-conformance-v1/runner.mjs +77 -0
  234. package/evals/fixtures/approved-host-contracts.invalid.json +43 -0
  235. package/evals/fixtures/approved-host-contracts.valid.json +43 -0
  236. package/evals/fixtures/benchmark-attempt-outcome.invalid.json +42 -0
  237. package/evals/fixtures/benchmark-attempt-outcome.valid.json +42 -0
  238. package/evals/fixtures/benchmark-independent-verification-plan.invalid.json +7 -0
  239. package/evals/fixtures/benchmark-independent-verification-plan.valid.json +21 -0
  240. package/evals/fixtures/composite-criterion.invalid.json +10 -0
  241. package/evals/fixtures/composite-criterion.valid.json +33 -0
  242. package/evals/fixtures/contract-family-library.invalid.json +42 -0
  243. package/evals/fixtures/contract-family-library.valid.json +41 -0
  244. package/evals/fixtures/contract-selection-recipe.invalid.json +29 -0
  245. package/evals/fixtures/contract-selection-recipe.valid.json +29 -0
  246. package/evals/fixtures/host-contract-plan.invalid.json +42 -0
  247. package/evals/fixtures/host-contract-plan.valid.json +41 -0
  248. package/evals/fixtures/scoped-project-verification-receipt-v2.invalid.json +42 -0
  249. package/evals/fixtures/scoped-project-verification-receipt-v2.valid.json +42 -0
  250. package/evals/fixtures/scoped-project-verification-receipt-v3.invalid.json +57 -0
  251. package/evals/fixtures/scoped-project-verification-receipt-v3.valid.json +57 -0
  252. package/evals/fixtures/scoped-verification-receipt-v1.invalid.json +40 -0
  253. package/evals/fixtures/scoped-verification-receipt-v1.valid.json +40 -0
  254. package/evals/fs5-artifact-archive/README.md +32 -0
  255. package/evals/fs5-artifact-archive/manifest.json +148 -0
  256. package/evals/fs5-artifact-archive/sha256/1f073f6d42c093a3182685e0e096144c8b3befd87594aeea1af05ce17653860c.txt +380 -0
  257. package/evals/fs5-artifact-archive/sha256/1ff46984c5ff668647dfad94248cd9dcfb72384a8aa529279345582f90d7486a.txt +331 -0
  258. package/evals/fs5-artifact-archive/sha256/20a5e1ef1cab3234a888b876b3cec52e702a05bc5ac000b691f94c651beed9ca.txt +800 -0
  259. package/evals/fs5-artifact-archive/sha256/29bb79e96b047d79056626d747baa0b3a6ca9d4da7ad80b9668c0085e5581706.txt +116 -0
  260. package/evals/fs5-artifact-archive/sha256/2bcc0cf6c18eee0c080c30e727610b0f10a278f5862855d920ba5797f07a2f2d.txt +252 -0
  261. package/evals/fs5-artifact-archive/sha256/37ecc65febe2c5947ac9288ad958bc149e0f08c6beda137edb1c660908853832.txt +324 -0
  262. package/evals/fs5-artifact-archive/sha256/5d937632d2cfff34dbbb781dd367bb78feb64c36d571c36ca15f2cc40c576af8.txt +142 -0
  263. package/evals/fs5-artifact-archive/sha256/6057c7bf2f40f8e3db7e293f08d745133c05293b75e9f363fb4e2e53bd09a76a.txt +244 -0
  264. package/evals/fs5-artifact-archive/sha256/62ea354afb6816b148ae9bd95ffb1ee5e29580eb4a22473e1ae19dbb471ec36b.txt +930 -0
  265. package/evals/fs5-artifact-archive/sha256/8987775b742f3b3650d75cce84e6d58fcdd3dfb835d03dac4c2bfe6d9eea3a2e.txt +903 -0
  266. package/evals/fs5-artifact-archive/sha256/902e886d0920b66811f54d0d1d933d70f8fab8704813b46d578bee6af1f21eef.txt +942 -0
  267. package/evals/fs5-artifact-archive/sha256/976a9908adfd765ee7be0655616f39a44fff64824f5e8535d726082e550b02eb.txt +910 -0
  268. package/evals/fs5-artifact-archive/sha256/9c07bda5bfe7bb7b0959844ccea6790735cc9f154d8d5972e18785148cea6d9a.txt +101 -0
  269. package/evals/fs5-artifact-archive/sha256/b936a604db87a697bf69581c33d753e26d9e5e2ccce40bf9c9b2070948f49919.txt +931 -0
  270. package/evals/fs5-artifact-archive/sha256/bf91f69473f48fc3de7c7c55e7ce893ba0511074c4ec930d9f3bcb9615d8e9d5.txt +950 -0
  271. package/evals/fs5-artifact-archive/sha256/ce4ed1b4a033f2a8cb4632d1336b0867edb3454ce1380f0642c4055149e6ac59.txt +784 -0
  272. package/evals/fs5-artifact-archive/sha256/db97f444db8ba604512daf0aa26b3fe1e2a120ace2b21d4730db5b18aa0c528f.txt +950 -0
  273. package/evals/fs5-causal-arm.v1.json +9 -5
  274. package/evals/fs5-pilot-protocol.v1.json +1 -1
  275. package/evals/fs5-pilot-protocol.v4.json +4 -4
  276. package/evals/fs5-pilot-protocol.v5.json +6 -5
  277. package/evals/harness-next/development-corpus.mjs +106 -0
  278. package/evals/harness-next/resource-budget-probe.mjs +38 -0
  279. package/evals/harness-next/run-calibration.mjs +83 -0
  280. package/evals/harness-next/run-resource-probe.mjs +55 -0
  281. package/evals/harness-next/selected-development-corpus.mjs +27 -0
  282. package/evals/harness-next.v1.json +51 -0
  283. package/evals/long-horizon-v1/README.md +19 -0
  284. package/evals/long-horizon-v1/runner.mjs +116 -48
  285. package/evals/long-horizon-v1/worker.mjs +77 -30
  286. package/evals/private-holdout-v1/CURRENT_BOUNDARY.md +53 -0
  287. package/evals/private-holdout-v1/README.md +5 -2
  288. package/evals/private-holdout-v1/public-exposure.v2.json +273 -0
  289. package/package.json +9 -4
  290. package/packages/piagent-core/README.md +2 -2
  291. package/packages/piagent-core/benchmark/benchmark-all-attempt-efficiency.js +55 -0
  292. package/packages/piagent-core/benchmark/benchmark-artifact-binding.js +49 -0
  293. package/packages/piagent-core/benchmark/benchmark-bootstrap.js +265 -14
  294. package/packages/piagent-core/benchmark/benchmark-budget-governor.js +271 -0
  295. package/packages/piagent-core/benchmark/benchmark-campaign.js +592 -0
  296. package/packages/piagent-core/benchmark/benchmark-candidate.js +8 -3
  297. package/packages/piagent-core/benchmark/benchmark-checkpoint.js +67 -0
  298. package/packages/piagent-core/benchmark/benchmark-claim-restrictions.js +269 -2
  299. package/packages/piagent-core/benchmark/benchmark-cli.js +120 -3
  300. package/packages/piagent-core/benchmark/benchmark-codex-events.js +235 -0
  301. package/packages/piagent-core/benchmark/benchmark-codex-outcome.js +20 -0
  302. package/packages/piagent-core/benchmark/benchmark-codex-relative-efficiency.js +2 -1
  303. package/packages/piagent-core/benchmark/benchmark-codex-rollout.js +521 -0
  304. package/packages/piagent-core/benchmark/benchmark-codex.js +104 -8
  305. package/packages/piagent-core/benchmark/benchmark-comparison.js +284 -1
  306. package/packages/piagent-core/benchmark/benchmark-core.js +107 -107
  307. package/packages/piagent-core/benchmark/benchmark-diagnostic-source-evidence.js +40 -0
  308. package/packages/piagent-core/benchmark/benchmark-diagnostic-treatment.js +104 -0
  309. package/packages/piagent-core/benchmark/benchmark-evaluator-v3.js +226 -0
  310. package/packages/piagent-core/benchmark/benchmark-execution-guard.js +23 -1
  311. package/packages/piagent-core/benchmark/benchmark-forensics.js +63 -50
  312. package/packages/piagent-core/benchmark/benchmark-goal-assessment.js +193 -0
  313. package/packages/piagent-core/benchmark/benchmark-goal-report.js +87 -0
  314. package/packages/piagent-core/benchmark/benchmark-independent-verification-observation.js +64 -0
  315. package/packages/piagent-core/benchmark/benchmark-matrix-summary.js +141 -0
  316. package/packages/piagent-core/benchmark/benchmark-matrix.js +1 -0
  317. package/packages/piagent-core/benchmark/benchmark-normalized-cost.js +62 -0
  318. package/packages/piagent-core/benchmark/benchmark-pi-home.js +1 -0
  319. package/packages/piagent-core/benchmark/benchmark-preflight.js +69 -8
  320. package/packages/piagent-core/benchmark/benchmark-process.js +23 -9
  321. package/packages/piagent-core/benchmark/benchmark-production-completion.js +84 -0
  322. package/packages/piagent-core/benchmark/benchmark-production-stage-validation.js +209 -0
  323. package/packages/piagent-core/benchmark/benchmark-provider-free-evidence.js +162 -45
  324. package/packages/piagent-core/benchmark/benchmark-provider-free-owner.js +24 -0
  325. package/packages/piagent-core/benchmark/benchmark-provider-wire.js +378 -0
  326. package/packages/piagent-core/benchmark/benchmark-record-validation.d.ts +2 -0
  327. package/packages/piagent-core/benchmark/benchmark-record-validation.js +269 -3
  328. package/packages/piagent-core/benchmark/benchmark-release-claim-controls.js +132 -0
  329. package/packages/piagent-core/benchmark/benchmark-report.js +79 -4
  330. package/packages/piagent-core/benchmark/benchmark-resume-recovery.js +280 -10
  331. package/packages/piagent-core/benchmark/benchmark-runner-policy.js +88 -1
  332. package/packages/piagent-core/benchmark/benchmark-runtime-identity.js +50 -1
  333. package/packages/piagent-core/benchmark/benchmark-runtime.js +102 -10
  334. package/packages/piagent-core/benchmark/benchmark-safety-evidence.js +74 -0
  335. package/packages/piagent-core/benchmark/benchmark-service-tier.js +189 -0
  336. package/packages/piagent-core/benchmark/benchmark-stage-diagnostic.js +144 -128
  337. package/packages/piagent-core/benchmark/benchmark-suite-identity.js +264 -1
  338. package/packages/piagent-core/benchmark/benchmark-suite-runtime.js +4 -0
  339. package/packages/piagent-core/benchmark/benchmark-suite.js +211 -4
  340. package/packages/piagent-core/benchmark/benchmark-summary-support.js +30 -2
  341. package/packages/piagent-core/benchmark/benchmark-timing-contract.js +189 -0
  342. package/packages/piagent-core/benchmark/benchmark-timing-diagnostics.js +110 -139
  343. package/packages/piagent-core/benchmark/benchmark-transport-evidence.js +203 -0
  344. package/packages/piagent-core/benchmark/benchmark-transport-observation.js +147 -0
  345. package/packages/piagent-core/benchmark/benchmark-tree-identity.js +2 -1
  346. package/packages/piagent-core/benchmark/benchmark-usage.js +395 -33
  347. package/packages/piagent-core/benchmark/benchmark-workflow.js +136 -38
  348. package/packages/piagent-core/benchmark/fs5-pilot-protocol.js +21 -2
  349. package/packages/piagent-core/capabilities/runtime-integrity.js +3 -0
  350. package/packages/piagent-core/extensions/acceptance-api-baseline.js +24 -0
  351. package/packages/piagent-core/extensions/acceptance-assessment.js +153 -0
  352. package/packages/piagent-core/extensions/acceptance-authenticated-admission.d.ts +41 -0
  353. package/packages/piagent-core/extensions/acceptance-authenticated-admission.js +120 -0
  354. package/packages/piagent-core/extensions/acceptance-behavior-proof.js +264 -70
  355. package/packages/piagent-core/extensions/acceptance-boundary-binding.js +31 -0
  356. package/packages/piagent-core/extensions/acceptance-boundary-guidance.js +214 -0
  357. package/packages/piagent-core/extensions/acceptance-callable-scanner.js +244 -0
  358. package/packages/piagent-core/extensions/acceptance-clause-group.js +45 -0
  359. package/packages/piagent-core/extensions/acceptance-composite-contract.js +334 -0
  360. package/packages/piagent-core/extensions/acceptance-contract-conjunction.js +78 -0
  361. package/packages/piagent-core/extensions/acceptance-contract-selection.js +161 -0
  362. package/packages/piagent-core/extensions/acceptance-contract-semantics.js +211 -211
  363. package/packages/piagent-core/extensions/acceptance-declared-api.js +126 -0
  364. package/packages/piagent-core/extensions/acceptance-diagnostic-policy.ts +14 -0
  365. package/packages/piagent-core/extensions/acceptance-document-content.js +73 -0
  366. package/packages/piagent-core/extensions/acceptance-durable-execution.d.ts +59 -0
  367. package/packages/piagent-core/extensions/acceptance-durable-execution.js +139 -0
  368. package/packages/piagent-core/extensions/acceptance-error-classes.js +1 -1
  369. package/packages/piagent-core/extensions/acceptance-evidence-store.js +223 -0
  370. package/packages/piagent-core/extensions/acceptance-executable-evidence.js +490 -88
  371. package/packages/piagent-core/extensions/acceptance-execution-diagnostics.js +34 -0
  372. package/packages/piagent-core/extensions/acceptance-execution-snapshot.js +174 -0
  373. package/packages/piagent-core/extensions/acceptance-executor/.dockerignore +21 -0
  374. package/packages/piagent-core/extensions/acceptance-executor/Dockerfile +5 -0
  375. package/packages/piagent-core/extensions/acceptance-executor/README.md +103 -0
  376. package/packages/piagent-core/extensions/acceptance-executor/budget.mjs +54 -0
  377. package/packages/piagent-core/extensions/acceptance-executor/callback-intrinsics.mjs +126 -0
  378. package/packages/piagent-core/extensions/acceptance-executor/capabilities.mjs +127 -0
  379. package/packages/piagent-core/extensions/acceptance-executor/guest.mjs +285 -0
  380. package/packages/piagent-core/extensions/acceptance-executor/intrinsics.mjs +133 -0
  381. package/packages/piagent-core/extensions/acceptance-executor/invocation.mjs +39 -0
  382. package/packages/piagent-core/extensions/acceptance-executor/jobs.mjs +29 -0
  383. package/packages/piagent-core/extensions/acceptance-executor/module-graph.mjs +70 -0
  384. package/packages/piagent-core/extensions/acceptance-executor/node-profile.mjs +398 -0
  385. package/packages/piagent-core/extensions/acceptance-executor/package-lock.json +40 -0
  386. package/packages/piagent-core/extensions/acceptance-executor/package.json +10 -0
  387. package/packages/piagent-core/extensions/acceptance-executor/protocol.mjs +248 -0
  388. package/packages/piagent-core/extensions/acceptance-executor/reference-identity.mjs +61 -0
  389. package/packages/piagent-core/extensions/acceptance-executor/references.mjs +14 -0
  390. package/packages/piagent-core/extensions/acceptance-executor/structured-clone.mjs +53 -0
  391. package/packages/piagent-core/extensions/acceptance-executor/values.mjs +97 -0
  392. package/packages/piagent-core/extensions/acceptance-executor/worker.mjs +75 -0
  393. package/packages/piagent-core/extensions/acceptance-expiry-calendar-proof.js +162 -0
  394. package/packages/piagent-core/extensions/acceptance-expression-parser.js +155 -0
  395. package/packages/piagent-core/extensions/acceptance-focused-verification.js +40 -0
  396. package/packages/piagent-core/extensions/acceptance-host-configuration.js +337 -0
  397. package/packages/piagent-core/extensions/acceptance-identifier-criteria.js +25 -0
  398. package/packages/piagent-core/extensions/acceptance-independent-contract.js +209 -0
  399. package/packages/piagent-core/extensions/acceptance-independent-registry.js +106 -0
  400. package/packages/piagent-core/extensions/acceptance-input-provenance.js +40 -0
  401. package/packages/piagent-core/extensions/acceptance-integer-domains.js +322 -0
  402. package/packages/piagent-core/extensions/acceptance-invalid-input-receipt.js +20 -0
  403. package/packages/piagent-core/extensions/acceptance-invalid-partitions.js +26 -0
  404. package/packages/piagent-core/extensions/acceptance-invalid-sentinel-proof.js +477 -0
  405. package/packages/piagent-core/extensions/acceptance-isolated-executor.js +254 -0
  406. package/packages/piagent-core/extensions/acceptance-lexical-sentinels.js +130 -0
  407. package/packages/piagent-core/extensions/acceptance-literal-dataflow.js +735 -0
  408. package/packages/piagent-core/extensions/acceptance-local-binding.js +106 -0
  409. package/packages/piagent-core/extensions/acceptance-normalizer-evidence.js +719 -0
  410. package/packages/piagent-core/extensions/acceptance-obligations.js +75 -0
  411. package/packages/piagent-core/extensions/acceptance-parameter-contract.js +756 -0
  412. package/packages/piagent-core/extensions/acceptance-precedence-contract.js +572 -0
  413. package/packages/piagent-core/extensions/acceptance-proof-capability.js +26 -0
  414. package/packages/piagent-core/extensions/acceptance-receipt.js +139 -152
  415. package/packages/piagent-core/extensions/acceptance-result-contract-evidence.js +159 -0
  416. package/packages/piagent-core/extensions/acceptance-source-origin.js +214 -0
  417. package/packages/piagent-core/extensions/acceptance-state-machine-evidence.js +64 -8
  418. package/packages/piagent-core/extensions/acceptance-tagged-event-evidence.js +685 -0
  419. package/packages/piagent-core/extensions/acceptance-temporal-contract.js +756 -0
  420. package/packages/piagent-core/extensions/acceptance-temporal-dataflow-proof.js +618 -0
  421. package/packages/piagent-core/extensions/acceptance-test-binding-evidence.js +20 -2
  422. package/packages/piagent-core/extensions/acceptance-test-bindings.js +86 -0
  423. package/packages/piagent-core/extensions/acceptance-tuple-shapes.js +12 -0
  424. package/packages/piagent-core/extensions/context-engine.js +11 -6
  425. package/packages/piagent-core/extensions/criterion-context-pack.js +96 -4
  426. package/packages/piagent-core/extensions/failure-types.ts +2 -2
  427. package/packages/piagent-core/extensions/guard-types.ts +5 -1
  428. package/packages/piagent-core/extensions/piagent-guard.ts +197 -155
  429. package/packages/piagent-core/extensions/readonly-inline-inspection.ts +378 -0
  430. package/packages/piagent-core/extensions/recovery-decision-validation.ts +92 -0
  431. package/packages/piagent-core/extensions/shell-write-targets.js +15 -14
  432. package/packages/piagent-core/extensions/task-contract-view.js +4 -4
  433. package/packages/piagent-core/extensions/task-digest-migration.js +2 -2
  434. package/packages/piagent-core/extensions/task-journal.js +48 -3
  435. package/packages/piagent-core/extensions/task-runtime-audit.js +8 -2
  436. package/packages/piagent-core/extensions/task-state.js +74 -38
  437. package/packages/piagent-core/extensions/task-terminal-disposition.js +10 -0
  438. package/packages/piagent-core/extensions/trajectory-contract.ts +5 -0
  439. package/packages/piagent-core/extensions/verification-intelligence.js +60 -8
  440. package/packages/piagent-core/extensions/workflow-catalog.ts +98 -0
  441. package/packages/piagent-core/extensions/workspace-revision.js +48 -0
  442. package/packages/piagent-core/extensions/workspace-verification-snapshot.js +13 -0
  443. package/packages/piagent-core/package.json +3 -3
  444. package/packages/piagent-core/policies/base-policy.json +1 -0
  445. package/packages/piagent-core/runtime/context/adaptive-planner.ts +7 -3
  446. package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +60 -59
  447. package/packages/piagent-core/runtime/hooks/agent-start-types.ts +48 -0
  448. package/packages/piagent-core/runtime/hooks/completion-hook.ts +76 -83
  449. package/packages/piagent-core/runtime/hooks/input-hook.ts +92 -7
  450. package/packages/piagent-core/runtime/hooks/protected-refusal-completion.ts +86 -0
  451. package/packages/piagent-core/runtime/hooks/session-hooks.ts +5 -2
  452. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +50 -18
  453. package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +53 -20
  454. package/packages/piagent-core/runtime/hooks/tool-result-metadata.ts +9 -0
  455. package/packages/piagent-core/runtime/hooks/tool-result-navigation.ts +36 -0
  456. package/packages/piagent-core/runtime/hooks/tool-result-retrieval.ts +42 -0
  457. package/packages/piagent-core/runtime/input/chat-images.ts +1 -1
  458. package/packages/piagent-core/runtime/inspection/activity-event-adapter.ts +1 -1
  459. package/packages/piagent-core/runtime/inspection/same-process-bridge-proof.ts +1 -1
  460. package/packages/piagent-core/runtime/inspection/task-handoff-history.ts +2 -2
  461. package/packages/piagent-core/runtime/inspection/tool-failure-classification.ts +49 -8
  462. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +61 -15
  463. package/packages/piagent-core/runtime/inspection/workspace-file-reader.ts +2 -132
  464. package/packages/piagent-core/runtime/model/provider-wire-fingerprint.ts +20 -0
  465. package/packages/piagent-core/runtime/model/service-tier-runtime.ts +242 -0
  466. package/packages/piagent-core/runtime/policy/source-worktree-transaction.ts +75 -14
  467. package/packages/piagent-core/runtime/product/activity-inspector.ts +6 -3
  468. package/packages/piagent-core/runtime/product/edit-verifier-timing.ts +26 -0
  469. package/packages/piagent-core/runtime/product/efficiency-metrics.ts +12 -7
  470. package/packages/piagent-core/runtime/product/operator-projections.ts +8 -3
  471. package/packages/piagent-core/runtime/product/task-usage-hooks.ts +78 -0
  472. package/packages/piagent-core/runtime/product/task-usage.ts +104 -0
  473. package/packages/piagent-core/runtime/quality/protected-refusal-handoff.ts +35 -0
  474. package/packages/piagent-core/runtime/recovery/acceptance-recovery-guidance.ts +21 -0
  475. package/packages/piagent-core/runtime/recovery/continuation-budget.ts +11 -2
  476. package/packages/piagent-core/runtime/recovery/diagnostic-delivery.ts +61 -0
  477. package/packages/piagent-core/runtime/recovery/handoff-projection.ts +192 -57
  478. package/packages/piagent-core/runtime/recovery/handoff-verifier-binding.ts +24 -0
  479. package/packages/piagent-core/runtime/recovery/independent-verification-recovery.ts +79 -0
  480. package/packages/piagent-core/runtime/recovery/recovery-policy.ts +27 -39
  481. package/packages/piagent-core/runtime/recovery/resume-state.ts +8 -5
  482. package/packages/piagent-core/runtime/registration/activity-inspector-command.ts +2 -1
  483. package/packages/piagent-core/runtime/registration/context-commands.ts +12 -8
  484. package/packages/piagent-core/runtime/registration/operator-catalogs.ts +4 -9
  485. package/packages/piagent-core/runtime/registration/policy-tools.ts +5 -3
  486. package/packages/piagent-core/runtime/registration/session-commands.ts +9 -7
  487. package/packages/piagent-core/runtime/registration/session-wait-tool.ts +54 -0
  488. package/packages/piagent-core/runtime/registration/task-completion-tools.ts +27 -11
  489. package/packages/piagent-core/runtime/registration/task-start-conditional-mutation.ts +45 -0
  490. package/packages/piagent-core/runtime/registration/task-start-guidance.ts +5 -2
  491. package/packages/piagent-core/runtime/registration/task-start-tool.ts +23 -23
  492. package/packages/piagent-core/runtime/registration/workflow-commands.ts +64 -93
  493. package/packages/piagent-core/runtime/session/completion-signals.ts +23 -0
  494. package/packages/piagent-core/runtime/session/message-signals.ts +6 -22
  495. package/packages/piagent-core/runtime/session/retrieval-evidence-runtime.ts +188 -0
  496. package/packages/piagent-core/runtime/session/runtime-state.ts +29 -35
  497. package/packages/piagent-core/runtime/session/system-prompt.ts +3 -3
  498. package/packages/piagent-core/runtime/session/uncertain-send-continuation.ts +231 -0
  499. package/packages/piagent-core/runtime/session/usage.ts +4 -3
  500. package/packages/piagent-core/runtime/tools/apply-patch-tool.ts +6 -6
  501. package/packages/piagent-core/runtime/tools/phase-tool-runtime.ts +1 -1
  502. package/packages/piagent-core/runtime/tools/phase-tools.ts +3 -2
  503. package/packages/piagent-core/runtime/tools/session-wait.ts +42 -0
  504. package/packages/piagent-core/runtime/tools/tool-groups.ts +10 -3
  505. package/packages/piagent-core/runtime/trajectory/trajectory-runtime.ts +192 -5
  506. package/packages/piagent-core/runtime/trajectory/trajectory-types.ts +3 -2
  507. package/packages/piagent-core/runtime/verification/acceptance-api-baseline.js +488 -0
  508. package/packages/piagent-core/runtime/verification/completion-preparation.ts +22 -0
  509. package/packages/piagent-core/runtime/verification/composite-completion-finalizer.ts +105 -0
  510. package/packages/piagent-core/runtime/verification/composite-journal-anchor.ts +181 -0
  511. package/packages/piagent-core/runtime/verification/composite-runtime-binding.ts +76 -0
  512. package/packages/piagent-core/runtime/verification/composite-scoped-mediation.ts +318 -0
  513. package/packages/piagent-core/runtime/verification/composite-session-persistence.ts +175 -0
  514. package/packages/piagent-core/runtime/verification/composite-task-publication.ts +273 -0
  515. package/packages/piagent-core/runtime/verification/exact-verifier-reuse.ts +11 -11
  516. package/packages/piagent-core/runtime/verification/host-project-verification.ts +71 -0
  517. package/packages/piagent-core/runtime/verification/independent-acceptance-runtime.ts +500 -0
  518. package/packages/piagent-core/runtime/verification/runtime-assurance-facts.ts +500 -0
  519. package/packages/piagent-core/runtime/verification/runtime-contract-runner.ts +107 -0
  520. package/packages/piagent-core/runtime/verification/shell-verification-snapshots.ts +56 -0
  521. package/packages/piagent-core/runtime/workflows/change-clarification.ts +61 -0
  522. package/packages/piagent-core/runtime/workflows/input-routing.ts +21 -14
  523. package/packages/piagent-core/runtime/workflows/runtime-intake-compaction.ts +44 -7
  524. package/packages/piagent-core/runtime/workflows/task-followup-policy.ts +163 -0
  525. package/packages/piagent-core/runtime/workflows/task-intake.ts +221 -242
  526. package/packages/piagent-core/runtime/workflows/task-repair-intent.ts +67 -0
  527. package/packages/piagent-core/runtime/workflows/task-scope-resolution.ts +83 -0
  528. package/packages/piagent-core/runtime/workflows/webui-runtime-command.ts +5 -2
  529. package/packages/piagent-core/runtime/workflows/webui-workflow.ts +39 -32
  530. package/packages/piagent-core/runtime/workflows/workflow-follow-up.ts +33 -0
  531. package/packages/piagent-core/security/workspace-file-reader.ts +132 -0
  532. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-B4XehTCU.js → MarkdownMessage-DGk34zJT.js} +1 -1
  533. package/packages/piagent-webui/dist/client/assets/{index-BV-_03yl.css → index-DVahUVWy.css} +1 -1
  534. package/packages/piagent-webui/dist/client/assets/index-DiKRmCEP.js +176 -0
  535. package/packages/piagent-webui/dist/client/index.html +2 -2
  536. package/packages/piagent-webui/extension/dispatch-user-entry.ts +13 -0
  537. package/packages/piagent-webui/extension/piagent-webui.ts +10 -2
  538. package/packages/piagent-webui/extension/review-controller.ts +29 -6
  539. package/packages/piagent-webui/extension/same-session-bridge.ts +6 -7
  540. package/packages/piagent-webui/extension/session-stream-adapter.ts +60 -11
  541. package/packages/piagent-webui/extension/source-mutation-controller.ts +29 -3
  542. package/packages/piagent-webui/extension/source-open-controller.ts +29 -7
  543. package/packages/piagent-webui/extension/source-revert-controller.ts +26 -3
  544. package/packages/piagent-webui/gateway/gateway-events.ts +22 -5
  545. package/packages/piagent-webui/gateway/gateway-service.ts +7 -2
  546. package/packages/piagent-webui/gateway/gateway-session-stream.ts +141 -19
  547. package/packages/piagent-webui/gateway/rpc-ui-context.ts +34 -9
  548. package/packages/piagent-webui/gateway/runtime-command-controller.ts +46 -6
  549. package/packages/piagent-webui/gateway/runtime-session-controls.ts +17 -2
  550. package/packages/piagent-webui/gateway/session-catalog.ts +9 -3
  551. package/packages/piagent-webui/gateway/session-command-controller.ts +29 -9
  552. package/packages/piagent-webui/gateway/session-effective-options.ts +2 -9
  553. package/packages/piagent-webui/gateway/session-inspection-registry.ts +11 -2
  554. package/packages/piagent-webui/gateway/session-operation-settlement.ts +28 -0
  555. package/packages/piagent-webui/gateway/session-prompt-dispatch.ts +37 -0
  556. package/packages/piagent-webui/gateway/session-runtime-close.ts +36 -0
  557. package/packages/piagent-webui/gateway/session-runtime-factory.ts +183 -6
  558. package/packages/piagent-webui/gateway/session-runtime-ownership.ts +48 -0
  559. package/packages/piagent-webui/gateway/session-runtime-state.ts +24 -0
  560. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +114 -114
  561. package/packages/piagent-webui/server/core-inspection-provider.ts +73 -14
  562. package/packages/piagent-webui/server/loopback-server.ts +9 -7
  563. package/packages/piagent-webui/server/terminal-delivery-receipt.ts +144 -0
  564. package/packages/piagent-webui/server/transcript-projection.ts +65 -12
  565. package/packages/piagent-webui/shared/message-correlation.ts +25 -0
  566. package/schemas/approved-host-contracts.schema.json +973 -0
  567. package/schemas/benchmark-attempt-outcome.schema.json +303 -0
  568. package/schemas/benchmark-independent-verification-plan.schema.json +34 -0
  569. package/schemas/composite-criterion.schema.json +788 -0
  570. package/schemas/contract-family-library.schema.json +28 -0
  571. package/schemas/contract-selection-recipe.schema.json +31 -0
  572. package/schemas/failure-evidence.schema.json +2 -2
  573. package/schemas/helper-request.schema.json +16 -4
  574. package/schemas/host-contract-plan.schema.json +25 -0
  575. package/schemas/piagent-webui/gateway-protocol-v1.schema.json +16 -2
  576. package/schemas/piagent-webui/runtime-command-v1.schema.json +26 -3
  577. package/schemas/piagent-webui/runtime-event-v2.schema.json +32 -1
  578. package/schemas/piagent-webui/session-live-state-v1.schema.json +2 -0
  579. package/schemas/piagent-webui/snapshot-v1.schema.json +3 -0
  580. package/schemas/piagent-webui/source-change-v1.schema.json +12 -0
  581. package/schemas/piagent-webui/transcript-v1.schema.json +2 -1
  582. package/schemas/public-contracts/codex-mcp-metadata-v1.schema.json +206 -0
  583. package/schemas/public-contracts/codex-mcp-metadata-v2.schema.json +228 -0
  584. package/schemas/public-contracts/codex-mcp-metadata-v3.schema.json +233 -0
  585. package/schemas/public-contracts/revocation-v1.schema.json +87 -0
  586. package/schemas/public-contracts/subscription-contract-v1.schema.json +76 -0
  587. package/schemas/scoped-project-verification-receipt-v2.schema.json +83 -0
  588. package/schemas/scoped-project-verification-receipt-v3.schema.json +295 -0
  589. package/schemas/scoped-verification-receipt-v1.schema.json +76 -0
  590. package/schemas/task-contract.schema.json +30 -0
  591. package/scripts/approve-independent-verification.mjs +57 -0
  592. package/scripts/benchmark-arm-observer.mjs +320 -0
  593. package/scripts/benchmark-budget-ipc.mjs +34 -0
  594. package/scripts/benchmark-budget-launcher.mjs +91 -0
  595. package/scripts/benchmark-budget-processes.mjs +133 -0
  596. package/scripts/benchmark-budget-publication.mjs +228 -0
  597. package/scripts/benchmark-budget-runtime.mjs +136 -0
  598. package/scripts/benchmark-candidate-ablation.mjs +265 -0
  599. package/scripts/benchmark-codex-journey.mjs +406 -0
  600. package/scripts/benchmark-independent-verification.mjs +628 -0
  601. package/scripts/benchmark-journey-outcome.mjs +92 -0
  602. package/scripts/benchmark-production-v3-human-review.mjs +192 -0
  603. package/scripts/benchmark-public-input-catalog.mjs +158 -0
  604. package/scripts/benchmark-registered-plan-author.mjs +355 -0
  605. package/scripts/benchmark-registered-plan-recipe-support.mjs +85 -0
  606. package/scripts/benchmark-registered-plan-recipes-backend.mjs +165 -0
  607. package/scripts/benchmark-registered-plan-recipes-data.mjs +164 -0
  608. package/scripts/benchmark-registered-plan-recipes-platform.mjs +165 -0
  609. package/scripts/benchmark-runner-completion.mjs +133 -0
  610. package/scripts/benchmark-runner-configuration.mjs +159 -0
  611. package/scripts/benchmark-runner-core.mjs +217 -388
  612. package/scripts/benchmark-runner-finalization.mjs +140 -27
  613. package/scripts/benchmark-runner-provider-boundary.mjs +44 -0
  614. package/scripts/benchmark-runner-schedule.mjs +256 -0
  615. package/scripts/benchmark-runner-support.mjs +136 -4
  616. package/scripts/benchmark-runner.mjs +95 -18
  617. package/scripts/benchmark-scoped-broker-custody.mjs +483 -0
  618. package/scripts/benchmark-scoped-docs-verifier.mjs +203 -0
  619. package/scripts/benchmark-scoped-frozen-qualification.mjs +676 -0
  620. package/scripts/benchmark-scoped-pi-router.mjs +196 -0
  621. package/scripts/benchmark-scoped-project-verification-receipt.mjs +49 -0
  622. package/scripts/benchmark-scoped-project-verifier.mjs +461 -0
  623. package/scripts/benchmark-scoped-session-custody.mjs +599 -0
  624. package/scripts/benchmark-scoped-session-factory.mjs +342 -0
  625. package/scripts/benchmark-scoped-tool-broker.mjs +523 -0
  626. package/scripts/benchmark-scoped-verification-supervisor.mjs +773 -0
  627. package/scripts/benchmark-session-evaluator.mjs +169 -0
  628. package/scripts/benchmark-session-provider-boundary.mjs +62 -0
  629. package/scripts/benchmark-session-usage.mjs +28 -0
  630. package/scripts/benchmark-session.mjs +343 -50
  631. package/scripts/benchmark-webui-journey.mjs +678 -0
  632. package/scripts/check-public-wording.mjs +46 -0
  633. package/scripts/fs4-readiness-evaluation.mjs +7 -1
  634. package/scripts/phase-tools-evaluation.mjs +1 -0
  635. package/scripts/pi-auto.sh +7 -1
  636. package/scripts/pi-usage-history.mjs +201 -11
  637. package/scripts/piagent-cli.mjs +8 -0
  638. package/scripts/private-holdout-readiness.mjs +7 -1
  639. package/scripts/public-evaluation-exposure.mjs +140 -0
  640. package/scripts/select-independent-verification.mjs +62 -0
  641. package/scripts/typescript-loader.mjs +135 -1
  642. package/scripts/update-global.mjs +6 -7
  643. package/scripts/verify-local.sh +36 -55
  644. package/scripts/verify-release-identity.mjs +5 -3
  645. package/packages/piagent-webui/dist/client/assets/index-CgOEyRPG.js +0 -176
@@ -0,0 +1,685 @@
1
+ # Plan riêng: ổn định logic Piagent và hoàn tất benchmark 108 phiên
2
+ <!-- language: vi; english-index: docs-site/content/en/benchmark.html -->
3
+
4
+ > Plan ID: **PRB-108-2026-09-06** · Version: **1.16** · Ngày: **2026-09-06**
5
+ >
6
+ > Trạng thái: **IMPLEMENTING_A_V2_OFFLINE — Number N/R5/independent verification đã duyệt; chưa qualification/B/paid**.
7
+ >
8
+ > Mục đích: bàn giao sang session khác, khép phạm vi sửa, xác thực logic và bộ đo bằng bằng chứng hữu hạn, sau đó chạy đúng một campaign 108 phiên khi đủ quyền và điều kiện.
9
+ >
10
+ > Chế độ mặc định: local, single-agent, tuần tự; không spawn subagent, tạo worktree, gọi provider, push hoặc release chỉ vì đọc tài liệu này.
11
+ >
12
+ > Đây là tài liệu nội bộ/local. Không publish đường dẫn evidence, dữ liệu phiên hoặc thông tin riêng của operator.
13
+
14
+ ## 0. Cách dùng và quan hệ với kế hoạch cũ
15
+
16
+ 1. Session mới đọc `AGENTS.md`, toàn bộ tài liệu này và Plan of Record cũ trước khi thay đổi source hoặc chạy qualification.
17
+ 2. Đây là **kế hoạch thực thi chuyên biệt**, không tự thay thế approval, ngân sách, disposition hoặc bằng chứng bất biến trong Plan of Record cũ.
18
+ 3. Operator nhận plan ngày 2026-09-06 cho R0–R1, sau đó xác nhận áp Decision A-v1 và tiếp tục offline R2–R6, gồm ba sửa grader đã nêu. Không restart P0–P10; A-SEM chưa chọn và Decision B/paid vẫn riêng.
19
+ 4. Khi operator yêu cầu triển khai, thực hiện R0–R1 để khóa hiện trạng và đề xuất source/contract trước. Không lặp lại các audit đã có kết luận.
20
+ 5. Khi operator nhận kế hoạch và duyệt phạm vi triển khai, ghi adoption vào decision log; đồng bộ một con trỏ và trạng thái ngắn vào Plan of Record cũ. Không tạo hai nguồn chỉ dẫn vận hành mâu thuẫn.
21
+ 6. Phần trùng với lịch sử phải dùng evidence đã có nếu identity và phạm vi còn phù hợp. Bằng chứng cũ không tự chứng nhận candidate mới.
22
+ 7. Chỉ dừng xin quyết định ở thay đổi quyền/phạm vi thật; không xin duyệt lại sau mỗi test hoặc mỗi phase đã có quyền.
23
+
24
+ ### 0.1. Mục tiêu và ba kết luận phải tách riêng
25
+
26
+ | Kết luận | Câu hỏi cần trả lời | Điều không được suy diễn |
27
+ | --- | --- | --- |
28
+ | Runtime contract | Phiên có thực thi, kết thúc, lưu trạng thái và bàn giao đúng sự thật không? | Kết thúc lượt không có nghĩa bài làm đúng |
29
+ | Measurement readiness | Bộ đo có ghi đúng cả thành công, thất bại, từ chối, usage và cleanup không? | Bộ đo đúng không có nghĩa Piagent đạt chất lượng |
30
+ | Product/claim readiness | Piagent giải được việc trong phạm vi công bố, đạt các ngưỡng đã khóa không? | 108 record hoặc test offline xanh không chứng minh ưu thế 35% |
31
+
32
+ Mục tiêu không phải đổi tên FAIL thành PASS. Mục tiêu là sửa các lỗi đã chứng minh, có một candidate xác định và thu được kết quả trung thực.
33
+
34
+ ### 0.2. Định nghĩa hoàn tất toàn nhiệm vụ
35
+
36
+ - Runtime đạt các invariant bắt buộc trong phạm vi đã chốt, gồm cả an toàn và không báo hoàn tất sai.
37
+ - Bộ chấm có đối chiếu yêu cầu–ca kiểm tra và positive/negative control; lỗ hổng đã biết được xử lý hoặc công khai đúng ảnh hưởng.
38
+ - Candidate được qualification mới, có diễn tập đủ lịch 108 offline và kiểm thử nhánh lỗi.
39
+ - Nếu đủ authority và provider không làm phép đo mất hiệu lực: thực hiện đúng 108 phiên, đủ 54 cặp, không lựa record đẹp.
40
+ - Báo cáo riêng kết quả phép đo và kết quả sản phẩm. `FAIL_VALID` hoàn tất một cuộc đo, **không hoàn tất mục tiêu Piagent đạt chuẩn**; phải giữ mục tiêu sản phẩm chưa đạt và nêu lỗi còn lại.
41
+ - Nếu `INVALID_MEASUREMENT`, giữ nguyên bằng chứng và đóng lượt chạy; không tự tạo campaign thay thế.
42
+ - Chỉ khẳng định sẵn sàng cho công việc thực tế trong phạm vi có bằng chứng; không mở rộng 27 bài synthetic thành bảo chứng mọi tác vụ trả phí.
43
+
44
+ ## 1. Nguồn sự thật cho session mới
45
+
46
+ Các ký hiệu dưới đây chỉ là cách viết ngắn trong tài liệu, không phải biến môi trường. Không dùng tên biến hệ thống để thay đổi thư mục làm việc.
47
+
48
+ | Ký hiệu | Đường dẫn tuyệt đối |
49
+ | --- | --- |
50
+ | `IMPL` | `/Users/vtamm/Documents/piagent-35-recovery-20260831T090020Z/implementation` |
51
+ | `POR` | `/Users/vtamm/Documents/piagent-35-recovery-20260831T090020Z/implementation/docs/piagent-codex-benchmark-recovery-plan.md` |
52
+ | `E03` | `/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260903T164605Z` |
53
+ | `E05` | `/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260905T152654Z` |
54
+
55
+ ### 1.1. Thứ tự đọc bắt buộc
56
+
57
+ - [x] `IMPL/AGENTS.md` và `POR` v3.28 hoặc bản mới hơn được xác thực.
58
+ - [x] `E05/30-d026-approval-20260906T025105Z/00-operator-d026-approval.v1.json`.
59
+ - [x] `E05/30-d026-approval-20260906T025105Z/02-source-binding-decision.md` và `03-current-checkpoint.v1.json` — xác minh tên file thực tế trước khi mở; không đoán khi khác tên.
60
+ - [x] `E05/31-benchmark-assurance-20260906T032332Z/report.md`, kèm `evidence.json`, `counterexamples.json`.
61
+ - [x] `E05/26-complete-declared-journey-observations/07-finite-failure-register.v1.json` và `12-final-canonical-offline.log`.
62
+ - [x] Các report/checkpoint cuối tại `E05/28-phase-specific-timeout-accounting/` và `E05/29-atomic-completion-audit/`, theo con trỏ đã ghi trong POR; chỉ mở artifact cần cho failure đang xử lý.
63
+ - [x] `E03/18-autonomous-budget-and-goal/38-d026-proposal.v1.json` và `39-run6-custody-d026-checkpoint.v1.json`.
64
+ - [x] `IMPL/benchmarks/production-v3/suite.json`, prompt liên quan, `variant.mjs`, `grade.mjs` và helper/reference liên quan trước khi sửa chúng.
65
+
66
+ Không mở auth, token, khóa ký hoặc raw session chỉ để tìm checkpoint. Nếu tài liệu không tồn tại hoặc hash lệch, báo đúng chênh lệch; không tự tạo tài liệu thay thế như thể evidence cũ vẫn hợp lệ.
67
+
68
+ ### 1.2. Checkpoint đã quan sát trước khi tạo tài liệu này
69
+
70
+ | Hạng mục | Hiện trạng |
71
+ | --- | --- |
72
+ | Branch dự kiến | `codex/piagent-35-recovery-20260831` |
73
+ | HEAD | `c3a4427396984554eb1571e687caba0f831176ae` |
74
+ | HEAD tree | `a4170461eee0e9efaebe6bbdf3e1c411ba39e627` |
75
+ | Working tree | 48 tracked modified + 47 untracked = 95 thay đổi trước khi thêm plan này; không phải clean candidate |
76
+ | Qualification toàn kho gần nhất | 5.064 test: 4.820 PASS, 22 FAIL, 222 SKIP; không được trừ các test chạy riêng để suy ra full PASS |
77
+ | Kiểm tra grader/record hẹp gần nhất | 35 PASS / 0 FAIL / 0 SKIP; 135 calibration cases vẫn chưa bao phủ hết public contract |
78
+ | Coverage journey đã ghi | 27 scenario, 54 lượt khai báo, 27 HTTP/WS observations; chỉ 11 expected outcomes được thiết lập tại checkpoint, không phải 27 bài đúng đều hoàn tất |
79
+ | Run-6 | 13 started / 12 accepted exact / 1 unknown; `INVALID_MEASUREMENT` |
80
+ | Chi tiêu phiên | Combined used 76; cap D-026 đã duyệt 184; còn tối đa 108, không có slack |
81
+ | Quyền | D-026 đã được duyệt; source binding và qualification mới chưa được xử lý |
82
+
83
+ Plan này sẽ làm inventory thay đổi thêm; session mới phải đối chiếu từng file/hash thay vì coi con số 95 là điều kiện bất biến.
84
+
85
+ ### A-v2 đã duyệt: Number, R5 và xác minh độc lập, 2026-09-06
86
+
87
+ **IMPLEMENTING_A_V2_OFFLINE.** Operator xác nhận “oke chốt thực hiện đi em, các vấn đề gì còn blocked thì phải reseach thẳn vấn đề đó” cho gói A-v2 đã trình. [Approval](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/00-decision-a-v2-approval.json): chọn pagination N/Number-Math.ceil; cho phép đúng patch R5 hai file SHA9451bed9c96a0635331abb3e934897320a079e61c7b392b5a4a28eb623a97ea0 như ngoại lệ rõ cho không đổi harness; cho phép dùng đường xác minh độc lập do host/operator quản lý và sửa hữu hạn executor/comparator theo finite register, gồm docs và compound. Điều tra trực tiếp blocker mới trong phạm vi này, không xin lại A-v1/A-v2. [R5 applied](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/02-r5-patch-applied.json);89file recovery được bảo toàn từ checkpoint083952Z, HEAD giữ c3a4427.
88
+
89
+ Đây là quyền triển khai offline và định nghĩa treatment mới có cấu hình xác minh độc lập; không gắn kết quả có verifier vào release-defaults cũ. Exact configuration/validator/image/candidate binding và qualification phải được ghi rõ trước Decision B. Không mặc định mọi18positiveFAIL đã được sửa hoặc tự xóa test cũ. B/paid vẫn chưa duyệt; không reserve, provider, regrade/reuse invalid campaign. Ngưỡng, seed,0retry và mốc12→18→54→108 giữ nguyên. A-v2 thay các chỉ dẫn lịch sử “A-SEM chưa chọn”, “không mở phạm vi proof capability” và “chờ ngoại lệ R5” chỉ trong phạm vi cụ thể nêu trên.
90
+
91
+ ### A-v2 E14: khép NDJSON timeout; verifier tài liệu kiểm đúng lệnh và current source
92
+
93
+ [Actual SDK NDJSON/replay](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T135741Z/11-ndjson-v4-actual-journeys.log)4PASS/0FAIL/0SKIP: NDJSON đúng completed và recovery0model, wrong dù native xanh bị chặn, unsupported bàn giao hữu hạn; replay đúng vẫn completed. Cleanup và cold readback đạt. [46 worker controls](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T135741Z/10-worker-v4-hash-budget-isolation-controls.log) đạt. Direct diagnostic xác định Node binary119647280bytes đọc vào một temporary mất1983.9ms; worker v4 dùng buffer1MiB băm đủ cùng tệp/cùng SHA. Không tăng5s request,300000µs thread,8s watchdog,CPU hoặc256MiB. Identity worker/profile/source đổi; observation v3 không được tái nhận dưới v4. E13 các lượt7/3 và2/1 giữ nguyên.
94
+
95
+ Docs đã áp policy host rõ ràng chạy đúng Git/conditional npm, pin toolchain/frozen project dependencies và biên nhận v3 gắn byte/hash tài liệu hiện tại. [6 real native controls](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T135741Z/03-docs-real-command-controls.log) và [268 schema/composite controls](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T135741Z/06-docs-schema-composite-controls.log) PASS,0SKIP. Lượt neighbors213PASS/3FAIL giữ lại; ba lỗi thiếu schema fixtures đã bổ sung, không hạ assertion. Chưa nối/chứng minh whole docs3turn actual SDK; content/context/scope/exclusive policy/verifier/persistence/delivery vẫn cần đủ. Expiry API/default proposal và full/P5/B còn mở. [Checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T135741Z/22-current-checkpoint.json), register27 và toàn bộ recovery work được bảo toàn;0provider/paid authority.
96
+
97
+ ### A-v2 E13: API migration, checkpoint/abort và lỗi thời gian NDJSON đã định vị
98
+
99
+ Đã gắn API công khai cho workflow/chat/workspace/pagination/retry/replay. [12 ca đúng actual SDK](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T125747Z/03-api-migrated-positive-journeys.log) PASS,0SKIP; workspace bỏ nhóm thừa vì câu yêu cầu chạy verification không phải API clause, giữ API trên sáu nhóm code thật. [Lượt checkpoint/continuity](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T125747Z/07-continuity-checkpoint-actual-journeys.log) giữ nguyên7PASS/3FAIL: checkpoint và abort cả đúng/sai/unsupported đạt đúng nghĩa; NDJSON correct, wrong cleanup và workspace wait đỏ. [Lượt chẩn đoán sau sửa fixture](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T125747Z/12-remaining-ndjson-workspace-diagnostics.log) giữ2PASS/1FAIL: workspace đúng completed, NDJSON sai bị chặn, NDJSON đúng còn đỏ do guest-wall-deadline ở invalid-leading-utf8, cleanup confirmed. Không tăng worker/runtime/arm budget; không dùng direct3PASS hay handoff để đóng correct-completion.
100
+
101
+ Cleanup07 đã đối chiếu và dọn đúng hai container mới thuộc lượt này; hai container lịch sử03/09 giữ nguyên. [Docs reproducer](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T125747Z/06-docs-exact-command-reproducer.json) xác nhận cần chạy Git/conditional npm thật và gắn current docs; [expiry proposal](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T125747Z/09-expiry-contract-direct.json) giữ arity1 với explicit-undefined rejection qua7 ca clock kiểm soát, chưa áp reference/oracle. [Checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T125747Z/22-current-checkpoint.json) và register27 cập nhật, correction đường dẫn RED E12 được ghi bổ sung không sửa evidence niêm phong. R2/R4 tiếp tục;18default positives và canonical4820/22/222 giữ nguyên. Chưa full qualification, B, provider hoặc paid authority.
102
+
103
+ ### A-v2 E12: khép lỗ hổng kiểm API trên tenant/invoice/dedup
104
+
105
+ Actual SDK RED03 cho thấy tenant đổi arity2→3 vẫn completed khi22body cases xanh. Sửa bằng contract host khai báo rõ baseline API công khai, gắn với source snapshot và signed plan; comparator Node v3, worker v3 giữ nguyên. Quan sát hữu hạn tên export, async/generator, positional parameters/default inert value và const literal/frozen; không tự chứng minh toàn bộ API động/return semantics. Metadata không gửi guest; guest không cấp authority. Source/plan/validator drift vẫn vô hiệu biên nhận. [82/82 controls](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T122631Z/09-api-comparator-authority-neighbors.log),0SKIP; [10/10 actual tenant/invoice/dedup journeys](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T122631Z/11-tenant-invoice-dedup-api-journeys.log),0SKIP. Bản đúng completed, wrong behavior/API arity bị chặn dù native checks xanh, unsupported bàn giao hữu hạn. Invoice/dedup có contract riêng cho nghĩa vụ API trước đó đỏ. Không đổi public request/reference/grader trong E12.
106
+
107
+ [Checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T122631Z/22-current-checkpoint.json). Backend/data đã dùng declared API binding; các helper workflow/chat/workspace/pagination/retry/replay chưa migrate. PASS lịch sử của chúng không đóng coverage gap vừa tìm thấy. Expiry Date.now default/API conflict và docs Git/conditional npm/current-source composite còn mở; remaining atomic families và full qualification chưa hoàn tất.0provider, chưa B/rebind;18default positive expectations và history4820/22/222 giữ nguyên. R2/R4 tiếp tục đúng finite register; không nghiên cứu thêm bộ chứng minh tổng quát.
108
+
109
+ ### A-v2 E11: replay correct-completion được khép sau sửa executor
110
+
111
+ [34/34 worker/comparator/identity controls](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T121350Z/08-clone-and-worker-neighbors.log),0SKIP; structuredClone trên inert records/arrays/primitives/Date có kiểm Node parity cho nested copy, aliases/cycles, sparse arrays và prototype/data descriptors. Getter/Proxy/typed/Map/Set/custom classes/transfer ngoài phạm vi hỗ trợ giữ unsupported, kể cả candidate catch hoặc reuse sequence. Bounds cũ giữ nguyên. [Actual configured replay](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T121350Z/09-configured-replay-after-clone.log):3/3 đúng/sai/unsupported; đúng completed cả request/recover, recovery0model, tất cả8host contracts PASS; bỏ version conflict bị chặn dù project checks xanh. Cold readback có đúng request/operation/session và cleanup. Reference và các correct-completion expectations không đổi; chỉ đưa diagnostics trước assertion để giữ lý do khi đỏ.
112
+
113
+ Worker Node profile v3, image887f3679… và digest208240c5… là identity mới, tách khỏi v2/E10. Build local dùng base pin, pull=false/network=none, không download. Build đầu thiếu allowlist module có RED03, sửa dependency closure tại06. Không dùng artifact worker cũ để qualify capability mới. [Checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T121350Z/22-current-checkpoint.json). R2/R4 tiếp tục: API invoice/dedup, docs exact command/composite và remaining families còn mở; next kiểm API false-success bằng actual mutation trong cùng configured path. Chưa full/B/paid,0provider, không miễn18default positive expectations hoặc history4820/22/222.
114
+
115
+ ### A-v2 E10: năm family mới có positive; API và worker còn lỗi cụ thể
116
+
117
+ **R2/R4 ĐANG TIẾP TỤC; R6/B CHƯA ĐẠT.** [Backend03](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/03-configured-backend.log):8PASS/1FAIL; tenant và revocation đủ đúng/sai/unsupported, invoice đúng còn pending. [Billing/data11](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/11-billing-invoice-data-journeys.log):10PASS/2FAIL; billing và CSV đủ đúng/sai/unsupported, invoice/dedup đúng còn FAIL. [Retry/replay13](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/13-retry-replay-journeys.log):6PASS/1FAIL; retry đủ4variants (large-Number và thiếu await bị chặn dù native checks xanh), replay đúng vẫn FAIL. Giữ từng lượt và identity; không cộng thành full qualification. Các negative/unsupported đều có cold readback và không completed; correct recovery tenant không có, revocation/billing/retry có0model theo declared journey.
118
+
119
+ Invoice/dedup: host behavior checks PASS nhưng standalone exported-API clause chưa được chứng minh. Đã sửa nhận diện đúng hai câu API; bộ so sánh primitive hiện có vẫn không hỗ trợ default parameter, reduce hoặc array/Map body. [RED06](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/06-api-and-checker-red.log) → [77/77neighbors09](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/09-api-checker-and-neighbors.log) chỉ đóng routing và checker identity, không đóng correct-completion. Không đổi nghĩa API thành chỉ đúng tên export.
120
+
121
+ Docs: fixed Node policy trước đây có thể cấp plan dù scripts/check.mjs đã đổi và chưa thực thi script ấy; nay khóa SHA checker công khai trước plan. Actual docs Git/conditional npm vẫn cần policy/receipt bind đúng command và source tại verify. [Điều tra trực tiếp](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/10-docs-direct-research.md) chỉ rõ sourceDigest nằm trong planDigest nên không được gỡ binding để tránh drift. Replay: [worker trực tiếp14](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/14-replay-direct-worker.json) xác nhận ReferenceError vì structuredClone chưa tồn tại; đây là executor gap, không phải lý do sửa bản đúng hoặc bỏ assertion recover0model. Next: bổ sung finite Node-profile capability có version/identity mới và kiểm đúng/sai/unsupported; API dùng explicit contract thay mở nghiên cứu prover.
122
+
123
+ [Checkpoint E10](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/22-current-checkpoint.json) và [finite register](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T112258Z/21-finite-issue-register.json). Giữ18default positive expectations/full4820PASS22FAIL222SKIP, run6 INVALID_MEASUREMENT13/12/1,76/184 và paid0. E8 R5 đủ108 chỉ chứng nhận identity lịch sử; final qualification và B riêng. A-v2 đã duyệt offline, không xin lại.
124
+
125
+ ### A-v2: chat, workspace và pagination có bằng chứng configured; docs còn mở
126
+
127
+ **R2/R4 ĐANG TIẾP TỤC, KHÔNG PHẢI FINAL QUALIFICATION.** Đã tái sử dụng đúng X1 error-message closure15file/hunk từ E1, giữ nativeOnly request schema; không viết bộ chứng minh mới. Worker local52af7e… đã có sẵn, Node profile v2 digest e3b562e…, không build/pull. [Adoption](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/02-adoption.json) và [11 error-message +43 authority +4 workflow](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/03-restored-message-and-current-workflow.log):58/58PASS,0SKIP.
128
+
129
+ Chat đúng đã hoàn tất toàn bộ nghĩa vụ; sai thông báo `conflict` bị worker bắt dù project checks xanh; unsupported không completed. Lượt reconnect đúng ban đầu gọi model thừa vì `/workflow review` bypass input hook. Namespace nay chỉ trả receipt hiện hữu khi idle và cùng task/session/attempt/acceptance; reader vẫn kiểm exact operation/request/parent/persistence. [RED](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/07-chat-recovery-diagnostic.log) → [19/19 gồm3chat +refusal/recovery +catalog/identity controls](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/10-chat-recovery-workflow-fix.log). Không nới kỳ vọng0model hoặc thêm counter.
130
+
131
+ Workspace [4/4actual SDK/HTTP/WS](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/14-configured-workspace-explicit-case-policy.log): đúng hoàn tất và recover0model; sai thông báo `cycle`, sai thứ tự và unsupported đều bị chặn hữu hạn. Pagination Number [3PASS/1fixture-timeout](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/18-configured-pagination-explicit-invocation.log), rồi [ca safe-integer-only1PASS](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/21-pagination-safe-integer-fixture-deadline.log): đúng hoàn tất, gồm2**54/2**55, API parent native vẫn satisfied; bản tự round hoặc thu hẹp safe-integer bị bắt với project checks xanh. Fixture timeout tăng60→120s để đủ tối đa12worker executions; không đổi arm900s, threshold hoặc retry benchmark. Hai lỗi khai báo fixture (ignoreCase/invocation) giữ RED tại12/16; validator không đổi. Không cộng lần chạy lại thành mẫu độc lập.
132
+
133
+ Điều tra trực tiếp docs phát hiện F26-02/configured-command-coverage: receipt worker Node PASS bị dùng xác nhận `git diff --check` chưa được chạy. [RED có chữ ký thực](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/22-scoped-command-coverage-red.log) → [50/50neighbor controls](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/25-scoped-command-coverage-and-neighbors.log). Runtime nay từ chối bộ lệnh chưa được protocol chứng minh, không dùng nội dung đúng để bỏ thiếu verifier. Docs source profile yêu cầu cả Git diff và conditional npm test; worker hiện có chỉ bốn nhóm Node. Cần bổ sung execution/receipt binding cho đúng lệnh và ghép với config literals, context, signed scope/tool-policy, persistence/delivery qua đường composite hiện có; actual correct docs phải hoàn tất đủ scout/implement/verify. Đây vẫn là gate mở, không lấy50PASS làm docs positive PASS.
134
+
135
+ [Checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/32-current-checkpoint.json), [register](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T102930Z/31-finite-issue-register.json). Giữ18default positive expectations và full4820PASS/22FAIL/222SKIP nguyên trạng; chưa chạy full mới. R5 đủ108offline ở identity trước delta; paid0, D02676/184 không đổi, B chưa duyệt. Next: khép các family atomic còn lại và docs configured, rồi final qualification/exact rebind. A-v2 đã cho phép tiếp tục offline, không xin lại.
136
+
137
+ ### A-v2: workflow configured đủ ba lượt; quyền từng yêu cầu đã kiểm
138
+
139
+ **RUNTIME_CONFIGURED_WORKFLOW_VERIFIED; R2/R4/R6 EXIT VẪN MỞ.** [Final sau tách helper đúng giới hạn kiến trúc](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/46-configured-final-after-extraction.log):47/47PASS (43authority/schema +4actual journeys),0FAIL/0SKIP/0cancelled. [Kiểm tra tĩnh](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/45-static-fix-checks.result.json) đạt; marker tài liệu và budget500dòng đã sửa. Các lượt trước được giữ dưới đây để đối chiếu RED→GREEN. [Actual SDK/worker](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/31-configured-workflow-review-proof.log):3/3 ca đúng/sai/unsupported đạt,0SKIP. [Kiểm lại sau khóa schema](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/34-native-controls-final.log):46PASS/1FAIL; lỗi còn lại là kỳ vọng test nhầm `handoff` với `ask-operator` cho approval sai phạm vi. [Sửa đúng policy và kiểm riêng](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/37-native-source-denial.log):1PASS/0FAIL/0SKIP, runtime không đổi. Không cộng các lượt lặp thành số mẫu độc lập.
140
+
141
+ Ca đúng hoàn tất scout → implement → review trong cùng session qua generated guard và HTTP/WS;4 compound code contracts PASS bằng worker thật, review kiểm lại34public cases trên source hiện tại. Bản sai cố ý có project tests xanh nhưng worker bắt own-undefined override bằng counterexample; unsupported import `node:fs` giữ unknown và handoff hữu hạn. Cả4variants có cold readback sau đóng supervisor,0active runtimes/lease released;0provider. Default workflow assertion và18positiveFAIL cũ không bị thay hoặc miễn.
142
+
143
+ Defect cụ thể: cấu hình toàn session chỉ có primary request làm scout bị chặn vì digest không được duyệt. Sửa nhỏ ở `acceptance-host-configuration.js`, `independent-acceptance-runtime.ts` và hai schemas: request set khai báo `nativeOnly:true, contracts:[]` chỉ cho task read-only + mutation-forbidden, không tạo criterion receipt. Request không khai báo vẫn bị chặn. Native-only dùng sai trên source-task giữ pending,0independent observations và ask-operator. Review là source-change/mutation-allowed nên dùng contract riêng kiểm lại nghĩa vụ gốc; không dùng native-only để bỏ qua proof.
144
+
145
+ Treatment vẫn là configured-host-verification A-v2 ở test-owned fixture, chưa operational approval hoặc đăng ký paid. [Register](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/41-finite-issue-register.json), [checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/43-current-checkpoint.json). R5 trước đó đủ108offline nhưng identity trước runtime delta; không nâng thành qualification cho candidate mới.
146
+
147
+ Next đã xác định hữu hạn: tái sử dụng error-message capability15file đã bảo toàn ở E1 để khép nghĩa `conflict`/`cycle`, sau khi merge hunk/kiểm hash và worker identity; không viết bộ chứng minh mới. Docs đúng phải nối content/config + scope/tool-policy signed journal + verifier + persistence/delivery qua composite/scoped broker hiện có; content-only không đủ. Hoàn tất các positive gates còn lại trước canonical full và proposal B. Không hỏi lại A-v2; B/paid vẫn riêng.
148
+
149
+ ### A-v2 hiện hành: R5 đủ108 offline; runtime configured đang triển khai
150
+
151
+ [Diễn tập](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/22-r5-full108-summary.json) chạy chung production schedule qua explicit offline seam:108accepted/108started,54pairs,54 mỗi arm,0retry/0unknown; ledger/manifest/governor khớp tại12→18→54→108,5580fresh token giả lập,54Codex homes đã xóa,54Pi runtimes/leases đã đóng. [Ledger và manifest riêng](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/20-offline108-retained/retention-receipt.json) được giữ trước khi xóa test-owned workspaces; không giữ raw session/auth/oracle. [Exact source94files](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T091158Z/24-r5-source-checkpoint.json) được bảo toàn trước delta kế tiếp.
152
+
153
+ Có68outcomes `none`,32`agent_task_failure`,8`safety_refusal_correct`; không biến quality FAIL thành PASS.82/108declared Pi turns thật sự chạy/cold-readback;26journeys dừng sớm vì task/operation chưa đạt, không nhận coverage cho26turns chưa chạy. R4 trước đó vẫn55tests37PASS/18FAIL, full4820PASS/22FAIL/222SKIP. Đây là diễn tập measurement với scripted model/usage và Codex event fixture, actual SDK/HTTP/WS/evaluator/WAL/ledger/budget; không chứng nhận native provider, production wire/registration, configured treatment hoặc launcher watchdog toàn process.
154
+
155
+ R5 RED đầu được giữ tại13/16:fixture circuit thiếu schema và giả định mọi quality failure xảy ra ởturn cuối; sửa fixture, không sửa task truth. Cặp có quality failure đạt4records, next arm tiếp tục; unknown injection đạt1accepted/2started/1unknown,khôngthirdattempt. Runner/ledger/budget regression98/98; calibration N37/37. Không cộng các nhóm thành full qualification. Worker local đã xác minh khớp current Node profile bằng isolated execution/cleanup; không pull/upgrade.
156
+
157
+ Next:kiểm actual workflow configured với correct/wrong/unsupported rồi khép các pending criteria hữu hạn. N đã chọn nhưng câu giữ API được phục hồi nguyên văn sau R5 vì phần Number wording không nên thay obligation API; giữ thay đổi Math.ceil/Number và calibration, không historical regrade. Vì có delta sau rehearsal, R6 phải bind final identity và final qualification; B/paid vẫn đóng.
158
+
159
+ ### Checkpoint kế thừa: R4-08 đọc lại dữ liệu sau khi đóng phiên, 2026-09-06
160
+
161
+ **R4-08 COMPLETE; R4 EXIT CHƯA ĐẠT.** [Report](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T083952Z/12-report.md), [checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T083952Z/13-current-checkpoint.json), [ma trận](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T083952Z/08-readback-matrix.json): 27 scenario / 54 lượt khai báo, 55/55 ca đọc lại đạt sau khi đóng connection/supervisor; fresh SDK và inspection đọc dữ liệu trên đĩa, branch/task hash và request/operation/parent khớp, runtime active0 và lease released. Không có bằng chứng process crash, mất điện hoặc browser DOM. Cùng lượt kiểm tra này giữ nguyên 37 PASS / 18 FAIL / 0 SKIP / 0 cancelled về kết quả sản phẩm; không sửa expected values và không đóng positive-completion gaps bằng handoff. Delta chỉ gồm hai test helpers, inventory public exposure và tài liệu. Core/suite giữ identity E6; full gần nhất vẫn 4820/22/222. [Register26rows](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T083952Z/11-finite-issue-register.json) kế thừa nguyên lỗi/disposition. R5 full108 vẫn chưa thực thi vì patch hai file runner chưa được auto-review cho phép; A-SEM, positive/P5, B/S0/freeze còn mở.0 provider mới, không paid authority.
162
+
163
+ ### Lịch sử: R5 full journey và lỗi delivery reader, 2026-09-06
164
+
165
+ **OFFLINE_PROGRESS_REBIND_CLOSED.** [Report](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T081322Z/15-report.md) / [checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T081322Z/16-current-checkpoint.json): đã nâng quality/accounting test qua actual full WebUI journey và cold disk readback. Phát hiện rồi sửa M-DELIVERY-CUSTOM: refused recovery có biên nhận custom nhưng benchmark chờ assistant nên timeout; bounded reader nay kiểm exact user/request/operation/parent. Final13reader controls và4actual chains PASS,0FAIL/0SKIP; refusal+reconnect khoảng2,3s,1model message/0tools, đúngusage vàcleanup. Không đổi task authority/grader/threshold. [Finite register26rows](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T081322Z/14-finite-issue-register.json) giữ25rows cũ và thêm1defect, full4820/22/222 và18positiveFAIL chưa đổi. Test selection sai lệch ởlog06 được ghi trong note09, final dùngempty test-owned homes. Patch shared scheduler vẫn chưa áp vì auto-review; câu hỏi exact exception đang chờ, không xin lại A-v1. R5full108/R4readback toàn27/P5/A-SEM/B còn mở;0external provider mới.
166
+
167
+ ### Lịch sử: R5 tiếp tục sau xác nhận A, 2026-09-06
168
+
169
+ **PAUSED_AUTO_REVIEW_SCOPE; A-v1 đã duyệt, không xin lại.** Operator nhắc tiếp tục không hỏi quyền đã cấp. [Patch hai file runner và next action](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T073448Z/01-r5-proposal-and-checkpoint.md) đã chuẩn bị ngoài implementation; normalized loop giữ nguyên và hai file đạt syntax checks. Bộ xét duyệt tự động từ chối áp hai lần, xác định offline schedule seam mới vượt ranh giới không đổi harness; kể cả sau đối chiếu scope/patch. Chưa thay source runner/runtime,0runtime tests/0provider/0executed108 records mới. Cần quyền cụ thể cho đúng patch đã có hash, không dùng workaround. R5-04/05 còn mở; A-SEM/positive/P5/B giữ nguyên. [Checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T073448Z/02-current-checkpoint.json) thay con trỏ trạng thái hiện hành, không thay lịch sử niêm phong.
170
+
171
+ ### Lịch sử: trạng thái goal sau blocked audit, 2026-09-06
172
+
173
+ **BLOCKED_OPERATOR_DECISION; mục tiêu đầy đủ chưa hoàn tất.** [Readback/audit ba lượt](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T065929Z/01-blocked-checkpoint.md) xác minh87 source hashes, parent evidence và3run6custody không drift; không còn test process để chờ. A-SEM chưa có lựa chọn;18 positive expectations/P5 và full108 integration vẫn mở sau bounded fixes. Giữ A-CORE/A-GRADER đã duyệt, không xin duyệt lại; không thêm proof capability/authority hoặc chạy full/audit lặp. Cần chốt proposal27 trước arithmetic/public contract change; lựa chọn đó không miễn các gate còn lại.0 tests/0 provider mới trong lượt audit này.
174
+
175
+ ### 1.2a. Checkpoint A-v1 đã áp dụng và offline hiện hành, 2026-09-06
176
+
177
+ Operator đã xác nhận **“Xác nhận áp Decision A-v1 và tiếp tục offline”**: A-CORE/A-GRADER và công việc offline R2–R6 được duyệt; A-SEM chưa có lựa chọn. [Approval](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T045530Z/00-operator-approval.json), [report và next action](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T045530Z/40-final-report.md), [checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T045530Z/46-checkpoint.json), [register cập nhật](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T045530Z/41-finite-issue-register.md). R0/R1 packet tại `benchmark-validity-recovery-20260906T040920Z` giữ nguyên, manifest SHA `6f6d632142a5927cc37b3f46af55709af35173835275758216f5212a24f1ebb6`.
178
+
179
+ Đã áp đúng selection 14 tracked baseline files và chuyển 1 untracked test, sau khi kiểm hash bản bảo toàn; toàn bộ96 file R0 còn phục hồi được. HEAD `c3a4427396984554eb1571e687caba0f831176ae`, branch và nội dung staging giữ nguyên; hash byte index đã đổi từ R1, khớp snapshot trước R4 (readback50); working tree chưa qualified hoặc commit. [Selection receipt](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T045530Z/01-selection-receipt.json) và inventory cuối ghi từng file/hash, không dùng con số95 làm điều kiện bất biến.
180
+
181
+ Đã sửa tenant/CSV/retry reference và đúng3 grader checks đã duyệt; sửa literal invalid-clock/local window/-Infinity routing; ngăn generic smoke tự chứng nhận nội dung docs; đóng bypass critical receipt khi zero-delta và không suy yêu cầu sản phẩm bắt buộc từ lifecycle metadata. Hai module được tách nguyên logic để đạt giới hạn kiến trúc; không thêm năng lực proof hoặc continuation counter. Ba calibration controls có RED→GREEN; calibration34/34, review controls5/5, fault chains109/109, neighbors/package142 PASS/0 FAIL/4 SKIP; browser22/22. Các nhóm này có overlap và revision riêng, không cộng thành qualification.
182
+
183
+ R4 đã quan sát27 scenario/54 declared turns qua scripted SDK/HTTP/WS trên các revision ghi trong log; 55 journey/control tests có37 PASS/18 FAIL,0 SKIP. Tất cả18 FAIL là positive-completion expectations còn giữ; wrong-docs control nay đạt nhưng correct-docs vẫn pending. [Ma trận](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T045530Z/42-journey-observation-matrix.md) không được dùng như kết quả một final immutable candidate. Runtime, measurement và product được tách trong register.
184
+
185
+ R5 mới kiểm scheduler/binding đúng108 cells/54 pairs,54 mỗi arm, seed và các mốc12→18→54→108; chưa thực thi full108 record replay.109 fault tests là evidence theo seam hiện có, không phải một campaign108. P5/full gần nhất vẫn **4.820 PASS / 22 FAIL / 222 SKIP / 0 cancelled**; không chạy full mới khi positive gates còn đỏ. R2/R3/R4/R5/R6 exit chưa đạt; kết luận **NOT_READY_TO_DISPATCH**.
186
+
187
+ Pagination A-SEM đang chờ lựa chọn cụ thể tại [proposal27](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T045530Z/27-arithmetic-decision.md); không tự chọn Number/Math.ceil, BigInt hoặc thu hẹp miền. Giữ release-defaults, P5 bắt buộc, reviewer waiver/reviewed=false và mọi threshold. Không có candidate rebind B, policy-bound S0/freeze, campaign reservation hoặc paid authority mới. Run6 giữ13started/12accepted exact/1unknown, INVALID_MEASUREMENT; combined76/184,0retry,3M fresh/4h và unknown-stop không đổi. Provider sessions mới **0**.
188
+
189
+ ### 1.2b. R5 continuation trên final runtime delta, 2026-09-06
190
+
191
+ [Evidence bổ sung](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T064300Z/04-r5-current-evidence-and-gap.md) / [checkpoint](/Users/vtamm/.pi/agent/benchmarks/piagent/benchmark-validity-recovery-20260906T064300Z/06-current-checkpoint.json):2 quality/accounting chains đạt trên core/suite identity parent, sau khi supervisor đóng vẫn giữ native pending → valid quality-failure record và SDK-inspected fixture usage. Boundary thực thi xác nhận production entry từ chối injected journey trước dispatch; explicit offline session seam không được chọn bởi main schedule.0 provider mới, không đổi runtime/treatment/grader. R5 full108 replay vẫn mở; không ghép108 record bằng runner khác để thay bằng chứng. R4 positive18FAIL và full4820/22/222 giữ nguyên. A-SEM chưa chọn, B/paid chưa có.
192
+
193
+ ### 1.3. Hai lưu ý ngăn chẩn đoán sai ngay từ đầu
194
+
195
+ **Runtime đã có global continuation maximum 1 và progress-signature guard.** Không được kết luận chưa có giới hạn vòng lặp rồi thêm một budget trùng lặp. Cần xác minh vì sao một yêu cầu không thể kiểm chứng vẫn đi vào diagnostic continuation, và tại sao một số lời giải đúng chưa hoàn tất được.
196
+
197
+ **Đường ghi quality failure thành record hợp lệ đã có evidence cục bộ.** Xem `E05/24-measurement-boundary-chain/`; cần nối/kiểm chứng phạm vi còn thiếu, không viết lại evaluator chỉ để tái tạo điều đã có.
198
+
199
+ ## 2. Quyền, phạm vi và các việc không làm
200
+
201
+ ### 2.1. Hai điểm quyết định, không sinh approval sau mỗi lỗi
202
+
203
+ **A — Khóa cách triển khai candidate và contract sau R1:**
204
+
205
+ - Bảo toàn toàn bộ recovery work; xác định những thay đổi sẽ thuộc candidate.
206
+ - Duyệt cách đưa candidate về một source identity có thể tái lập mà không mất các thay đổi ngoài candidate.
207
+ - Chốt phạm vi hỗ trợ logic/verification và disposition của các known failures.
208
+ - Nếu cần thay đổi policy, treatment, grader hoặc nghĩa qualification thì nêu riêng từng thay đổi; không gộp thành “fix nhỏ”.
209
+
210
+ **B — Rebind và mở paid sau R6:**
211
+
212
+ - Bind exact commit/tree/package/candidate/suite/configuration/policy/runtime closure mới.
213
+ - Giữ hoặc ghi rõ thay đổi so với D-026; không suy rằng approval ngân sách tự duyệt candidate khác.
214
+ - Chỉ chạy paid khi approval và các gate thực tế đều đủ. Nếu operator đã cấp conditional authority rõ cho đúng những nội dung này, dùng đúng authority đó; không xin lại chỉ vì đổi phase.
215
+
216
+ Hai điểm quyết định là đề xuất quy trình, không phải hai approval đã tồn tại.
217
+
218
+ ### 2.2. Ranh giới cứng
219
+
220
+ - Không thay code, prompt, grader, oracle, seed, model, thứ tự, timeout hoặc threshold trong campaign trả phí.
221
+ - Không resume/retry/regrade/reconcile/reuse/merge run-6 hoặc các lineage cũ bị invalid.
222
+ - Không lấy test do model vừa viết hoặc lời model nói “xong” làm quyền độc lập chứng nhận hoàn tất.
223
+ - Không cung cấp hidden oracle cho model/candidate hay hardcode tên scenario vào core Piagent.
224
+ - Không bật independent-verifier authority, cài verifier/image hoặc ký cấu hình thay operator.
225
+ - Không giảm an toàn, tắt completion gate, xóa test đỏ hoặc đổi unsupported thành completed để đạt số phiên.
226
+ - Không dùng 108 phiên trả phí làm integration test.
227
+ - Không nâng dependency/model/provider, đổi sang Oh My Pi/OpenClaw/OpenClaude hoặc xây harness mới trong đợt này.
228
+ - Không thêm private holdout, reviewer giả hoặc claim tổng quát. Waiver reviewer vẫn là waiver, `reviewed=false` phải giữ trung thực.
229
+ - Không stash/reset/checkout/discard toàn bộ working tree, tạo worktree mới, push hoặc publish nếu chưa được yêu cầu cụ thể.
230
+ - Workspace `/Users/vtamm/Documents/pi-company-platform` chỉ để đọc hướng dẫn; không triển khai ở đó.
231
+
232
+ ## 3. Bài học mã nguồn mở được áp dụng có giới hạn
233
+
234
+ Đã khảo sát ngày 06/09/2026; đây là đọc source/CI và release notes, chưa tự chạy toàn bộ test của các repo. Những cách làm sau là gợi ý thiết kế, không phải bằng chứng Piagent đã đạt.
235
+
236
+ | Nguồn đã đọc | Áp dụng vào plan | Không sao chép |
237
+ | --- | --- | --- |
238
+ | [Oh My Pi release gate](https://github.com/can1357/oh-my-pi/blob/b2f25dbfe1e30197bae311cd8a0bccbc381f5c7b/.github/workflows/ci.yml#L476) | Chia nhóm kiểm thử, gom một release gate; đúng artifact và identity | Toàn bộ CI đa nền tảng, tính năng hoặc toolset mới |
239
+ | [Oh My Pi session durability test](https://github.com/can1357/oh-my-pi/blob/b2f25dbfe1e30197bae311cd8a0bccbc381f5c7b/packages/coding-agent/test/session-manager-immediate-persist.test.ts#L86) | Kiểm tra trạng thái thực được lưu, không chỉ event ở bộ nhớ | Khẳng định ghi vào OS cache là bảo đảm chịu mọi mất điện |
240
+ | [OpenClaw agent loop](https://github.com/openclaw/openclaw/blob/4b577944c8597c2d0c6406a1c214b412f68d0e8a/docs/concepts/agent-loop.md) | Owner terminal rõ; tách execution/persistence/delivery, wait timeout/run timeout, writer identity | Các fallback/retry làm thay đổi treatment 0 retry |
241
+ | [OpenClaw testing](https://docs.openclaw.ai/help/testing) | Tách unit, integration, package, transport, live-provider; targeted trước full | Gọi mock là live proof hoặc coi phát hành thường xuyên là không có lỗi |
242
+ | [OpenClaude loop-guard regressions](https://github.com/Gitlawb/openclaude/blob/0abfca30e5a2945678415f5328691584387720fb/src/query/toolFailureLoopGuard.test.ts#L140) | Phân biệt lỗi lặp, tiến bộ thật và user abort; test xuyên query loop | Thêm bộ đếm mới khi Piagent đã có budget và progress guard |
243
+ | [OpenClaude release workflow](https://github.com/Gitlawb/openclaude/blob/0abfca30e5a2945678415f5328691584387720fb/.github/workflows/release.yml) | Test bản cài/đóng gói, không chỉ source tree | Publish hoặc cài global trong session này |
244
+
245
+ Không tiếp tục khảo sát hàng loạt harness khác trừ khi một failure cụ thể thiếu phương án và nguồn trên không giải quyết được.
246
+
247
+ ## 4. Sơ đồ phase và điều kiện đi tiếp
248
+
249
+ | Phase | Kết quả bàn giao | Gate chính | Provider |
250
+ | --- | --- | --- | --- |
251
+ | R0 | Snapshot và custody hiện hành | Không mất work, không lệch evidence chưa giải thích | 0 |
252
+ | R1 | Candidate/contract decision, danh sách lỗi đóng | Phạm vi và quyền triển khai đã rõ | 0 |
253
+ | R2 | Sửa logic runtime có reproducer | Đúng hoàn tất, sai không lọt, unsupported bàn giao hữu hạn | 0 |
254
+ | R3 | Xác thực reference và grader | Tiêu chí–test đối chiếu được, positive/negative đúng | 0 |
255
+ | R4 | Journey qua runtime/package thật | Đủ 27/54 và kết quả từng nhánh đúng, phạm vi proof rõ | 0 |
256
+ | R5 | Diễn tập lịch 108 và nhánh lỗi | Runner/accounting/stop/cleanup khép kín | 0 |
257
+ | R6 | Qualification + approval binding + S0/freeze | Đúng candidate, đúng quyền, không gate đỏ chưa xử lý | 0 |
258
+ | R7 | Một campaign, tối đa 108 phiên | Theo D-026/rebind, không tuning giữa run | ≤108 |
259
+ | R8 | Báo cáo kép và checkpoint đóng | Phân biệt đo hợp lệ với sản phẩm đạt chuẩn | 0 thêm |
260
+
261
+ R0–R6 là phạm vi chuẩn bị offline. R7 là mốc mở chi phí duy nhất. Thứ tự có thể tận dụng bằng chứng sẵn có, nhưng không nhảy gate bằng một kết quả hẹp.
262
+
263
+ ## 5. R0 — Tiếp nhận, bảo toàn và xác minh hiện trạng
264
+
265
+ **Mục tiêu:** session mới biết chính xác đang tiếp tục từ đâu, không “khởi động lại hai tuần sửa”.
266
+
267
+ - [x] R0-01: xác minh đúng repo, branch, HEAD/tree; đọc chỉ dẫn và checkpoint theo mục 1.
268
+ - [x] R0-02: ghi inventory tracked/untracked, hash các file thay đổi và các package/runtime đang dùng; phân biệt file plan mới với 95 thay đổi phục hồi trước đó.
269
+ - [x] R0-03: đối chiếu source hash với stage30; chỉ điều tra các delta mới thật, không audit lại 95 file từ đầu nếu byte-identical.
270
+ - [x] R0-04: kiểm tra hash run-6 manifest, attempts và accepted ledger với custody receipt; không sửa record hoặc tính unknown thành zero.
271
+ - [x] R0-05: kiểm tra read-only run-7 root, campaign pointer/lock và tiến trình liên quan. Nếu có lượt khác đang chạy, không tạo writer cạnh tranh; báo operator phối hợp.
272
+ - [x] R0-06: tạo evidence root mới có timestamp UTC trong recovery namespace khi bắt đầu triển khai; ghi manifest nguồn và liên kết evidence kế thừa.
273
+ - [x] R0-07: lập bản sao bảo toàn có kiểm chứng cho các thay đổi trước khi thực hiện lựa chọn source. Không stage/commit secret, raw session, auth, cache hay local trust.
274
+ - [x] R0-08: xuất checkpoint ngắn: state, authority, known blockers, next exact action; không mở provider.
275
+
276
+ **Đầu ra đề xuất:** `00-baseline-state.json`, `01-source-inventory.json`, `02-custody-check.json`, `03-checkpoint.md` trong evidence root mới.
277
+
278
+ **Exit:** chênh lệch đã được xác định; mọi work giữ nguyên; biết rõ không có campaign đang bị ghi đồng thời.
279
+
280
+ **Không làm:** full rerun để “xem còn lỗi gì”, đọc secret hoặc dựng lại campaign cũ.
281
+
282
+ ## 6. R1 — Khóa candidate, contract và danh sách lỗi hữu hạn
283
+
284
+ **Mục tiêu:** một phương án có thể thi hành; không chỉ thêm một report về blocker cũ.
285
+
286
+ ### 6.1. Candidate tối thiểu nhưng đủ phụ thuộc
287
+
288
+ - [x] R1-01: dùng `c3a4427` làm mốc tái lập; không dùng nguyên bản cũ vì đã biết có lỗi đo refusal, cũng không mặc định nhận toàn bộ recovery tree.
289
+ - [x] R1-02: phân loại từng hunk/file cần thiết: measurement repair, runtime correctness, test/reference, experimental proof expansion, docs/generated/dependency.
290
+ - [x] R1-03: tạo allowlist candidate gồm fix có evidence và dependency closure thực sự cần. “Tối thiểu” không phải đạt một số lượng file tùy ý.
291
+ - [x] R1-04: ghi những thay đổi chưa chọn sẽ được giữ ở đâu, cách phục hồi và hash; xin đúng quyền trước khi đưa chúng ra khỏi active candidate. Không tự tạo worktree/checkout mới hoặc đảo patch trên work người dùng.
292
+ - [x] R1-05: không thêm proof capability/recognizer mới để cố đóng từng bài. Nếu core contract thật sự cần capability mới, nêu như thay đổi kiến trúc có lựa chọn và tác động, không mặc định triển khai.
293
+
294
+ ### 6.2. Danh sách lỗi kế thừa — bắt buộc có disposition từng lỗi
295
+
296
+ | Cụm đã biết | Cách xử lý bắt buộc |
297
+ | --- | --- |
298
+ | Ba reference/coverage defects: tenant numeric ID, CSV `""`, retry integer domain | Tái dùng phản ví dụ đã có; sửa reference trong phạm vi đã duyệt và kiểm tra grader tương ứng; không chữa bằng cách viết lại đề |
299
+ | False negative của early correct refusal trong journey | Giữ regression và fix cần thiết; xác minh refusal đúng không lẫn unexpected refusal/unsafe action |
300
+ | Hai docs assertions | Xử lý cả false completion của bản thiếu restart command và pending của bản đúng ở review; không chỉ chữa một phía |
301
+ | Hai compound-authority gaps | Phân biệt thiếu năng lực/authority với lỗi bài làm; không tự bật verifier để lấy PASS |
302
+ | Một pagination arithmetic question | Khóa nghĩa public contract và miền input; không chọn cách tính sau khi nhìn paid output |
303
+ | Mười hai atomic completion gaps | Dùng map stage29: routing defect, ngoài hợp đồng, missing witness, unsupported phải tách riêng; không gom thành một root cause |
304
+ | Hai measurement tests khác nhau giữa full và targeted | Dùng sửa fixture phase-specific stage28 và evidence đã có; xác minh trên candidate cuối, không tăng timeout để che lỗi |
305
+
306
+ Các dòng trên có quan hệ với 22 failing tests lịch sử, không phải số lượng root cause độc lập để cộng lại.
307
+
308
+ Mỗi issue có: `id`, observed evidence, expected contract, root-cause confidence, minimal reproducer, file/hunk owner, positive control, negative control, gate impact, disposition, next action.
309
+
310
+ - [x] R1-06: không đánh đồng `sourceOk=false` với “implementation sai”.
311
+ - [x] R1-07: phân biệt lỗi chặn phép đo với lỗi chất lượng sản phẩm; riêng policy violation, data loss và false success nghiêm trọng không được hạ thành backlog để mở paid.
312
+ - [x] R1-08: chốt miền runtime phải hỗ trợ cho release-defaults. Nếu correct reference nằm trong miền hỗ trợ thì phải hoàn tất; chuyển nó thành unsupported là thất bại sản phẩm, không phải sửa xong.
313
+ - [x] R1-09: lập bảng ánh xạ ngưỡng claim hiện có giữa suite, policy và goal report; không giản lược mọi ngưỡng thành một con số 35%. Bất nhất phải giải quyết trước freeze, không chọn điều kiện dễ hơn.
314
+ - [x] R1-10: ghi Decision A. Khi chưa duyệt thay đổi source/contract cần thiết, dừng triển khai phần đó; có thể hoàn tất các read-only checks còn thiếu.
315
+
316
+ **Đầu ra:** candidate manifest dự kiến; finite issue register; contract matrix; danh sách thay đổi quyền và quyết định A.
317
+
318
+ **Exit:** mỗi lỗi có đường xử lý hoặc giới hạn rõ; không còn chỉ dẫn “thử thêm một recognizer rồi xem”. R1-08 và A-CORE/A-GRADER đã được operator duyệt; R2–R6 offline đã có quyền. A-SEM chưa chọn; mọi phase exit vẫn phải đạt gate thực tế.
319
+
320
+ ## 7. R2 — Sửa đường hoàn tất và bàn giao trong runtime
321
+
322
+ **Mục tiêu:** kết thúc đúng sự thật, giữ an toàn và không tạo thêm continuation vô ích.
323
+
324
+ ### 7.1. Tái sử dụng schema và owner hiện có
325
+
326
+ - [x] R2-01: lập bản đồ đường vào → operation → durable task → receipt → Gateway/WebUI → evaluator. Chỉ định owner cho terminal từng tầng; không thêm schema mới nếu schema hiện tại đủ.
327
+ - [x] R2-02: giữ nguyên raw outcome và lý do; adapter có thể chuẩn hóa cho measurement nhưng không được ghi đè sự thật runtime.
328
+ - [ ] R2-03: kiểm tra non-composite không bị ép qua composite gate; composite vẫn fail-closed khi thiếu persistence/delivery hoặc authority bắt buộc.
329
+ - [x] R2-04: intermediate turn có thể operation completed nhưng task pending; final turn phải có disposition cụ thể. Không ép task xong ở scout hoặc implement khi journey còn verify.
330
+ - [ ] R2-05: phân loại ba đường: counterexample thật → sửa trong budget; thiếu evidence có thể thu thập → verification hữu hạn; unsupported/thiếu authority → handoff rõ, không tiếp tục sửa source vô ích.
331
+ - [x] R2-06: dùng continuation maximum và progress-signature hiện có. Test chứng minh không vượt budget, không reset bằng cách đổi thông điệp, không thêm một cơ chế đếm cạnh tranh.
332
+ - [x] R2-07: thông tin missing proof không tự cấp quyền sửa hoặc tự phê chuẩn; negative test ngăn stale/partial/tampered receipt, oracle leak và self-certification.
333
+ - [ ] R2-08: sửa hai chiều của docs completion; generic verifier xanh không đủ để xác nhận nội dung bắt buộc hiện diện.
334
+
335
+ ### 7.2. Ma trận invariant tối thiểu
336
+
337
+ | Ca | Điều phải chứng minh qua runtime |
338
+ | --- | --- |
339
+ | Correct + authoritative current evidence | Native durable task hoàn tất; final response và wire khớp |
340
+ | Wrong + executable counterexample | Không completed; failure giữ đúng nguyên nhân |
341
+ | Missing tests, có đường verification | Chỉ hành động có thể tạo evidence mới, trong budget |
342
+ | Unsupported/authority absent | Handoff hữu hạn, không báo PASS, không tự cấp authority |
343
+ | Protected refusal đúng | Refused đúng, không thao tác bị cấm, không unknown |
344
+ | Unexpected refusal / policy violation | Không bị hợp thức hóa thành correct refusal |
345
+ | Abort trước request / giữa stream / sau native terminal | Phân biệt phase; không bịa usage hoặc làm mất completed terminal đã xác thực |
346
+ | Duplicate/reordered/stale terminal | Không ghi trùng, không để lượt cũ đổi kết quả lượt mới; conflict bị phát hiện |
347
+ | Reconnect / uncertain send | Giữ request/session identity; không tự replay request trả phí |
348
+ | Persistence/cleanup failure | Không báo thành công giả; đủ evidence để dừng admission |
349
+
350
+ - [x] R2-09: ưu tiên typed event/receipt sẵn có; hạn chế suy outcome từ từ khóa trong prose. Nếu fallback bắt buộc, có contract và negative tests rõ.
351
+ - [ ] R2-10: mỗi patch đi theo RED → smallest fix → GREEN → neighboring tests. Không chạy full suite trước khi reproducer đã xanh.
352
+
353
+ **Vị trí khảo sát:** `runtime/hooks/completion-hook.ts`, `runtime/recovery/`, `runtime/verification/`, `runtime/registration/task-completion-tools.ts`, `extensions/acceptance-receipt.js`, Gateway/session-stream và ba script journey/evaluator đang thay đổi.
354
+
355
+ **Checkpoint 1.2:** R2-01/02/04/06/07/09 có evidence runtime/receipt/collector trong report40 và logs20/26/32/33/35/39. R2-03/05 vẫn cần đạt toàn ma trận; R2-08 mới đóng false-success, correct-docs chưa hoàn tất. R2-10 chỉ đạt cho các predicate đã sửa, không đóng positive gate.
356
+
357
+ **Exit:** ma trận bắt buộc đạt trên candidate; positive và negative đều đúng; không còn false success hoặc lặp ngoài budget trong các đường đã khóa.
358
+
359
+ ## 8. R3 — Xác thực reference, oracle và bộ chấm offline
360
+
361
+ **Mục tiêu:** dùng phép kiểm tra độc lập với lời model, không tự tin từ số lượng test.
362
+
363
+ - [x] R3-01: giữ workload 27 bài/9 family/2 surface/2 repeat. Không thêm family, thay độ khó hoặc tuyển chọn lại bài theo kết quả paid.
364
+ - [x] R3-02: đối chiếu từng tiêu chí public prompt với assertion; ghi rõ miền input, boundary, invalid input và yêu cầu không mutate.
365
+ - [x] R3-03: sửa ba reference defects đã có reproducer; kiểm tra cả ba phản ví dụ cụ thể, không chỉ các giá trị random hiện sinh.
366
+ - [ ] R3-04: mỗi scenario có known-correct và targeted near-miss cho nghĩa quan trọng. Dùng năm loại calibration hiện có làm nền; chỉ thêm controls cho lỗ hổng thật, không nhân test vô ích.
367
+ - [ ] R3-05: positive/negative labels dựa vào contract và phép kiểm tra thực thi; không dùng chính reference đang bị nghi ngờ làm nguồn chân lý duy nhất cho cả input và expected.
368
+ - [x] R3-06: kiểm tra metadata integrity, grader crash, missing result, stale oracle, mutation ngoài scope, task refusal/safety và output leak.
369
+ - [x] R3-07: oracle nằm ngoài workspace và không đi vào prompt/context/source của candidate; fixture secrets phải synthetic.
370
+ - [x] R3-08: ghi trường semantic nào được fixture cung cấp và trường nào được native runtime quan sát. Không gọi kết quả mock là provider proof.
371
+ - [x] R3-09: nếu cần sửa grader/oracle, viết change review và diff riêng; operator phải duyệt measurement-definition change trước freeze/paid. Không dùng plan này như blanket waiver.
372
+ - [x] R3-10: giữ historical grades/evidence; không regrade run-6 để chữa outcome.
373
+ - [x] R3-11: thống kê coverage theo criterion và family, không dùng số test làm số mẫu độc lập. Không bỏ nhãn `reviewed=false` khi không có reviewer thật.
374
+
375
+ **Checkpoint 1.2:** R3 kế thừa audit/matrix stage31 và R1, thêm đúng3 controls được duyệt. R3-04/05 còn arithmetic blindspot chưa khóa; 34 PASS không chứng nhận known-correct toàn miền pagination.
376
+
377
+ **Đầu ra:** criterion-to-check matrix, calibration report, reference fixes, grader change review nếu có, explicit blindspots.
378
+
379
+ **Exit:** known-correct/known-wrong phân biệt đúng trong miền đã khóa; không còn known misgrading ở workload dự định đo; không có assertion bị nới theo kết quả mong muốn.
380
+
381
+ ## 9. R4 — Xác thực 27 journey qua runtime và package thật
382
+
383
+ **Mục tiêu:** chứng minh code đã sửa thật sự nằm trên đường người dùng và runner sử dụng.
384
+
385
+ - [x] R4-01: tái dùng coverage 27/54 và các helper/journey hiện có; xác định phần cần chạy lại do candidate thay đổi.
386
+ - [x] R4-02: build/install vào test-owned isolated fixture từ candidate thực, nạp đúng guard, WebUI extension, profile, settings và runtime closure. Không dùng facade bỏ qua entry point rồi gọi là package proof.
387
+ - [x] R4-03: phát scripted model response qua seam được khai báo; phần intake, tools, supervisor, SDK, HTTP/WS, persistence và evaluator còn lại đi đường thật trong phạm vi đo.
388
+ - [x] R4-04: chạy đầy đủ 27 scenario / 54 declared turns cho các expected journeys; giữ thứ tự scout/implement/verify và request/recovery.
389
+ - [ ] R4-05: từng scenario có cả positive và relevant negative outcome. Positive được phép refusal đối với bài safety; không ép 27 scenario đều có taskStatus completed.
390
+ - [ ] R4-06: correct candidate + evidence hợp lệ thuộc miền hỗ trợ phải hoàn tất; wrong implementation không lọt; unsupported chỉ đạt bài test handoff, không đạt bài test completion.
391
+ - [x] R4-07: xác minh requestId/sessionId/taskId/turn index/receipt/wire/evaluator khớp; không sửa expected value theo nhánh vừa quan sát.
392
+ - [x] R4-08: đọc lại dữ liệu persisted sau khi process/connection kết thúc; nếu test crash chỉ chứng minh software-crash thì ghi đúng, không tuyên bố chịu mất điện.
393
+ - [x] R4-09: chạy browser regression hiện có cho UI bị ảnh hưởng. HTTP/WS observations không tự trở thành DOM/browser E2E; chỉ mở rộng browser case khi có failure hoặc contract UI bắt buộc.
394
+ - [x] R4-10: ghi treatment mặc định và mode verifier chính xác; kết quả bật private verifier không được gắn nhãn release-defaults.
395
+
396
+ **Checkpoint 1.2:** R4-04 là coverage27/54 đã quan sát, không phải mọi expected outcome đạt hoặc final-candidate qualification. R4-05/06 còn18 positive assertions đỏ; R4-08 đã có55/55readback cho toàn27/54 sau connection/supervisor close tại checkpoint083952Z; không tuyên bố process exit/crash hoặc mất điện.
397
+
398
+ **Đầu ra:** journey matrix gồm expected/actual native task, transport, semantic, grade, evidence mode và test pointer; package identity report.
399
+
400
+ **Exit:** các invariant bắt buộc và expected outcomes trong miền release đã chọn đạt. Nếu còn completion gap, giữ product gate đỏ; không đóng R4 chỉ vì đã quan sát đủ 27 bài.
401
+
402
+ ## 10. R5 — Diễn tập toàn bộ lịch 108 và fault injection
403
+
404
+ **Mục tiêu:** kiểm tra máy điều phối benchmark trước khi dùng model trả phí.
405
+
406
+ ### 10.1. Một lịch offline 108, không phải paid evidence
407
+
408
+ - [x] R5-01: tái dùng campaign scheduler/runner, budget governor, evaluator, ledger và cleanup hiện có; không tạo runner thứ hai chỉ dùng cho test.
409
+ - [x] R5-02: offline replay dùng mock/scripted provider ở boundary thấp nhất có thể. Stock Codex collector phải được kiểm tra bằng fixture transcript contract; không sửa binary stock hoặc tuyên bố đã chứng minh native provider.
410
+ - [x] R5-03: giữ nguyên 27 × 2 × 2, thứ tự và seed đã định. Input paired tương đương phải được kiểm tra bằng binding/digest, không chỉ nhìn title.
411
+ - [x] R5-M1: full journey quality/refusal + cold disk readback cho4chains; M-DELIVERY-CUSTOM có RED→GREEN và negative binding controls. Đây là component evidence, chưa full108.
412
+ - [x] R5-04: đi hết 108 record trong offline happy path, đủ 54 pairs, 54 sessions mỗi arm; không duplicate/missing ID hoặc rò state giữa workspace.
413
+ - [x] R5-05: thêm quality-failure/refusal hợp lệ vào lịch kiểm soát để chứng minh scheduler vẫn đi tiếp; tất cả chi phí mô phỏng vẫn được cộng đúng.
414
+ - [x] R5-06: không inject raw accepted ledger/terminal truth để bỏ qua đường cần kiểm tra; mỗi giả lập phải khai báo rõ boundary và loại bằng chứng.
415
+
416
+ ### 10.2. Bộ nhánh lỗi hữu hạn — không cần lặp cả 108 cho từng lỗi
417
+
418
+ - [ ] Pre-dispatch failure: không có provider start; không bị tính thành unknown paid attempt.
419
+ - [ ] Request đã bắt đầu rồi partial stream/timeout: giữ usage đã biết hoặc lower bound; unknown không thành zero; admission dừng.
420
+ - [ ] Exit 0 kèm turn.failed/item.error/tool failure: phân loại theo contract, không success theo exit code.
421
+ - [ ] Duplicate/conflicting/missing terminal hoặc thiếu thread/usage: giữ lỗi và fail closed.
422
+ - [ ] Grader crash/record-schema reject: evidence tồn tại, campaign không tiếp tục như thể quality FAIL thông thường.
423
+ - [ ] Drift source/package/config/seed: chặn trước request kế tiếp.
424
+ - [ ] Cleanup không xác nhận/lease còn giữ: chặn dispatch; không dọn rộng tài nguyên người dùng.
425
+ - [ ] Budget threshold giữa phiên: không admit phiên tiếp theo; ghi overshoot thực của in-flight và cleanup.
426
+ - [x] Boundary 12/18/54 và cuối 108: ledger/governor/campaign counts khớp, không mở phiên 109.
427
+ - [ ] Uncertain send/reconnect: không replay một request có thể đã được provider nhận.
428
+
429
+ **Checkpoint A-v2:** R5-04/05 và bốn mốc đã thực thi trên identity tại24-r5-source-checkpoint.json;108accepted,32quality failures được giữ,8correct refusals,0unknown main. Explicit unknown fixture dừng đúng2started/1accepted. Các fault khác chỉ đóng theo mapping từng seam của evidence cũ/98regression; không lấy109PASS làm tất cả fault hoặc final configured qualification. Current configured runtime còn triển khai; không reuse rehearsal này như final identity sau source delta.
430
+
431
+ **Đầu ra:** offline-108 manifest và ledger riêng, fault matrix, counts reconciliation, cleanup receipt; tất cả gắn `provider-free/synthetic usage`, tuyệt đối không trộn với paid ledger.
432
+
433
+ **Exit:** bình thường đi hết lịch; mỗi fault dừng/tiếp tục đúng policy; không bị bỏ lại process/lease; 0 external provider calls.
434
+
435
+ ## 11. R6 — Qualification cuối, rebind quyền và freeze
436
+
437
+ **Mục tiêu:** một bản xác định đủ điều kiện đo, không dùng PASS của source khác.
438
+
439
+ - [ ] R6-01: chốt candidate theo Decision A, bảo toàn work không thuộc candidate; rà secret và public exposure trước local commit nếu được phép.
440
+ - [x] R6-02: kiểm tra source/dependency/runtime closure và generated artifacts đồng bộ. Không thêm cosmetic change chỉ để tạo digest mới.
441
+ - [ ] R6-03: chạy targeted/neighboring cho delta cuối, rồi canonical full provider-free verification một lượt trên identity cuối.
442
+ - [x] R6-04: ghi toàn bộ PASS/FAIL/SKIP/cancelled, SDK path, môi trường và thời gian. Required tests bị skip không phải PASS; không lấy số xanh của nhóm con thay full result.
443
+ - [x] R6-05: mọi full-suite RED có disposition trước khi mở paid. **P5 cũ vẫn là điều kiện bắt buộc cho đến khi operator duyệt sửa nghĩa gate cụ thể.** Plan không cho phép agent tự bỏ một test đỏ vì gọi nó là product-only.
444
+ - [ ] R6-06: nếu đề nghị tách qualification, giữ nguyên full result và mapping từng failure; cần operator duyệt phần ngoại lệ rõ. Không miễn các lỗi safety, false success, identity, accounting, corrupt evidence hoặc cleanup.
445
+ - [x] R6-07: đối chiếu workload/model/thinking/service tier/timeout/thresholds và phương pháp thống kê; không thay treatment bằng mode có quyền verifier mạnh hơn để lấy điểm.
446
+ - [ ] R6-08: tạo proposal rebind với exact commit/tree/candidate/package/suite/config/runtime/policy identity và delta so với D-026. Những trường chưa được phép tạo authority phải giữ ở trạng thái proposed.
447
+ - [ ] R6-09: ghi Decision B/authority áp dụng, rồi tạo policy-bound dry-run, bốn lane S0 và freeze theo trình tự validator yêu cầu. Tất cả vẫn provider-free.
448
+ - [ ] R6-10: kiểm tra absent/unused của run-7 root và state trước one-shot creation; nếu tên đã dùng, không ghi đè hoặc tự chọn campaign thay thế.
449
+ - [x] R6-11: readback toàn bộ gate và quyền; xuất một kết luận duy nhất `READY_TO_DISPATCH` hoặc blocker có bằng chứng.
450
+
451
+ **Checkpoint 1.2:** R6-05 nghĩa là mỗi lỗi có disposition trong register41; không miễn lỗi hoặc mở paid. R6-11 kết luận NOT_READY_TO_DISPATCH, không phải R6 exit. R6-01 còn final qualification/commit; R6-03/08/09 chưa đủ điều kiện. Historical P5 FAIL giữ nguyên.
452
+
453
+ ### 11.1. D-026 hiện hành phải được bảo toàn trong proposal mới
454
+
455
+ | Trường | Giá trị đã duyệt / điều kiện |
456
+ | --- | --- |
457
+ | Combined cap | 184, đã dùng 76 tại checkpoint |
458
+ | Fresh run maximum | 108 phiên, 0 slack, 0 infrastructure retry |
459
+ | Management fresh tokens | 3.000.000 |
460
+ | Management active wall time | 14.400.000 ms = 4 giờ |
461
+ | Timeout | 900 giây/phiên, đối xứng hai arm |
462
+ | Treatment | Piagent release-defaults; stock controlled Codex |
463
+ | Model settings | Theo frozen suite: `openai-codex/gpt-5.6-luna`, thinking medium, fast |
464
+ | Stage boundaries | **12 → 18 → 54 → 108** |
465
+ | Unknown mới / invalid measurement | Dừng admission ngay |
466
+ | Source gốc | c3a4427, sourceChanges=0; không bao phủ candidate mới tự động |
467
+
468
+ Tên `NOT_APPROVED` trong proposal D-026 lịch sử không phủ nhận approval thật sau đó. Ngược lại, approval thật không xóa điều kiện identity/qualification. Management threshold không phải bảo đảm zero overshoot hoặc đủ 108 dưới mọi latency.
469
+
470
+ **Exit:** candidate hiện hành qualified theo gate đã được duyệt; D-026/rebind và freeze khớp chính candidate đó; không còn lỗi bắt buộc chưa đóng.
471
+
472
+ ## 12. R7 — Một campaign trả phí, chạy theo 12 → 18 → 54 → 108
473
+
474
+ **Mục tiêu:** thu đủ phép đo đã đăng ký, không sửa để chạy đến PASS.
475
+
476
+ - [ ] R7-01: trước request đầu, readback authority, zero pending stop reason, source freeze, runtime closure, budget và campaign paths.
477
+ - [ ] R7-02: thực thi stage 1–12 bằng lệnh đã được dry-run/validator xác nhận. Tài liệu này không cung cấp lệnh paid đoán từ tên script.
478
+ - [ ] R7-03: tại 12, đối chiếu all-attempt spend, exact usage, accepted records, quality failures, identity và cleanup; đi tiếp nếu gate cho phép, không đòi Piagent phải dẫn điểm.
479
+ - [ ] R7-04: tiếp tục 13–18, 19–54, 55–108 theo stage boundary đã duyệt, với cùng checks. Không thêm canary ngoài 108.
480
+ - [ ] R7-05: mọi model/tool request phát sinh trong phiên phải được tính theo đúng accounting contract; không giấu retry nội bộ hoặc đổi provider/model.
481
+ - [ ] R7-06: giữ quality/task/workflow/token/latency failures hợp lệ; không sửa code, prompt, grader, timeout hay thay input rồi chạy tiếp campaign đó.
482
+ - [ ] R7-07: unknown mới/identity drift/grader-integrity/accounting/cleanup/classification failure: dừng admission, giữ exact/lower-bound evidence, cleanup có giới hạn, báo `INVALID_MEASUREMENT`.
483
+ - [ ] R7-08: nếu operator yêu cầu pause, dừng nhận phiên mới, xử lý in-flight theo policy và checkpoint. Không hứa resume nếu interrupted attempt làm usage unknown.
484
+ - [ ] R7-09: không tự mở run-8 hoặc tăng cap khi run-7 dừng. Không retry attempt đã có khả năng nhận bởi provider.
485
+
486
+ **Exit bình thường:** 108 phiên và 54 cặp theo matrix; exact accounting, integrity và cleanup đầy đủ.
487
+
488
+ **Exit bất thường:** checkpoint dừng trung thực. Đây không phải “đã chạy xong 108”, cũng không phải quyền tiếp tục vô hạn để đạt con số.
489
+
490
+ ## 13. R8 — Kết luận benchmark và chuẩn logic sản phẩm
491
+
492
+ - [ ] R8-01: reconcile planned/start/accepted/failed/unknown counts, model requests, usage, active time và cleanup; không loại failure khỏi mẫu số.
493
+ - [ ] R8-02: xuất verdict measurement: `PASS_VALID`, `FAIL_VALID` hoặc `INVALID_MEASUREMENT` theo schema/threshold đã khóa.
494
+ - [ ] R8-03: báo riêng product status; nếu chất lượng không đạt thì giữ mục tiêu sản phẩm chưa hoàn tất, dù đo đủ 108.
495
+ - [ ] R8-04: báo resolved/quality/safety/workflow và fresh token/total traffic/chi phí/thời gian thành các đại lượng riêng. Không dùng cache-inclusive savings để thay fresh-token target.
496
+ - [ ] R8-05: dùng family làm đơn vị suy luận theo suite; không gọi 108 phiên là 108 task độc lập. Giữ confidence interval và mọi ngưỡng đã preregister.
497
+ - [ ] R8-06: ghi giới hạn: suite tự biên soạn, public, reviewer waived, không family-disjoint private holdout, không traffic/member evidence.
498
+ - [ ] R8-07: nếu FAIL_VALID, tạo danh sách lỗi sản phẩm ưu tiên từ evidence; không tự mở campaign cải thiện hoặc sửa cùng frozen lineage.
499
+ - [ ] R8-08: checkpoint cuối có source, policy, campaign, verdict, unresolved issues, quyền và next action; hash artifact, không publish mặc định.
500
+
501
+ ### 13.1. Chuẩn dùng trả phí thực tế — không đánh tráo với benchmark
502
+
503
+ Benchmark này chỉ có thể đóng kết luận trong phạm vi 27 tình huống. Để dùng cho một dự án thật, cần thêm acceptance criteria của chính dự án đó: việc nào phải sửa, verifier nào đáng tin, phạm vi quyền, rollback/checkpoint và cách bàn giao khi thiếu khả năng.
504
+
505
+ Đó là một đợt product acceptance riêng khi có yêu cầu và dữ liệu thật; **không được thêm nó làm prerequisite mới trước R7**, cũng không được tuyên bố đã có bằng chứng chỉ vì synthetic benchmark đạt.
506
+
507
+ ## 14. Cơ chế chống vòng lặp của chính quá trình sửa
508
+
509
+ ### 14.1. Một issue, một chuỗi bằng chứng
510
+
511
+ 1. Đọc retained evidence trước; không tái phát hiện vấn đề đã biết.
512
+ 2. Viết root-cause statement với mức chắc chắn và phạm vi.
513
+ 3. Minimal reproducer/negative test phải đỏ trên bản trước sửa.
514
+ 4. Smallest scoped fix.
515
+ 5. Test đó xanh, positive control vẫn đúng, neighboring tests không regression.
516
+ 6. Full qualification chỉ sau khi nhóm sửa đã khép.
517
+ 7. Ghi disposition và next action cụ thể; không “đã thêm test” như kết luận fix xong.
518
+
519
+ ### 14.2. Quy tắc dừng có ích
520
+
521
+ - Cùng root cause tái diễn hai lần sau fix: dừng patch cùng hướng, review owner/state contract bằng một reproducer; không paid rerun.
522
+ - Hai vòng chỉ đổi wording/fixture để bộ nhận dạng chấp nhận mà không tạo hành vi/evidence mới: coi là không tiến bộ; bỏ phương án đó, giữ RED.
523
+ - Không rerun full suite lặp lại chỉ để kiếm một lần xanh. Nếu full/targeted khác nhau, lưu phase evidence, tái hiện đúng điểm bất định.
524
+ - Giới hạn một quyết định kiến trúc sau khi finite register đã khóa; nếu cần mở rộng, trình tác động/phương án hẹp hơn, không tự phát triển “proof engine vNext”.
525
+ - Unsupported được bàn giao hữu hạn; không dùng handoff PASS để xóa correct-completion FAIL.
526
+ - Không tự tạo một cơ chế budget/ledger/state machine mới nếu cơ chế hiện có chỉ cần sửa đúng owner/adapter.
527
+ - Đánh giá tiến bộ bằng invariant hoặc issue được đóng, không bằng số file, dòng code, report hay test được sinh.
528
+
529
+ ### 14.3. Kiểm soát phạm vi và thời gian
530
+
531
+ Đây là timebox rà soát, không phải lời hứa xong trong một ngày:
532
+
533
+ - R0–R1: một lượt tiếp nhận và một bản quyết định. Nếu đã có đủ map stage29, không làm thêm audit tương đương.
534
+ - R2–R3: xử lý từng root cause trong finite register; sau tối đa hai phương án thất bại phải quyết định giữ giới hạn hay sửa kiến trúc có duyệt.
535
+ - R4–R5: tái dùng helpers và runner hiện có; không xây framework test mới.
536
+ - R6: một canonical full run cho candidate cuối; chỉ lặp sau khi có nguyên nhân và delta cụ thể.
537
+ - R7: 4 giờ là management threshold theo D-026, không phải ETA chắc chắn cho đủ 108.
538
+
539
+ ## 15. Bản đồ kiểm tra hiện có và cách chạy an toàn
540
+
541
+ Các đường dẫn dưới đây đã được tìm thấy trong repo lúc lập plan. Session thực thi phải đọc script/help và xác minh side effects trước khi chạy; không copy lệnh benchmark sản xuất để thử.
542
+
543
+ | Phạm vi | Điểm vào hiện có |
544
+ | --- | --- |
545
+ | Runtime recovery/continuation | `tests/recovery-policy.test.mjs`, `tests/continuation-budget.test.mjs`, `tests/pi-082-runtime-phase-e2e.test.mjs` |
546
+ | Journey/evaluator | `tests/benchmark-webui-journey.test.mjs`, `tests/production-journey-*.test.mjs` |
547
+ | Grader/schema | `tests/production-v3-calibration.test.mjs`, `tests/benchmark-record-validation-v3.test.mjs` |
548
+ | Accounting/stop | `tests/benchmark-pi-quality-accounting-chain.test.mjs`, `tests/benchmark-pi-timeout-accounting-chain.test.mjs`, `tests/benchmark-budget-*.test.mjs` |
549
+ | Campaign | `tests/benchmark-campaign.test.mjs`, `tests/benchmark-runner.test.mjs` |
550
+ | Packaging/identity | `tests/package-distribution.test.mjs`, `tests/release-identity.test.mjs`, `scripts/verify-release-identity.mjs` |
551
+ | Browser | `playwright.webui.config.mjs`; npm script `test:webui:e2e` |
552
+ | Canonical offline | `bash scripts/verify-local.sh --offline`, sau khi đọc đầy đủ script và chuẩn bị runtime path |
553
+
554
+ Ví dụ kiểm tra hẹp đã được dùng trước đây, thực hiện trong `IMPL` khi bước tương ứng được phép:
555
+
556
+ ```sh
557
+ PIAGENT_NO_UPDATE_CHECK=1 node --test tests/production-v3-calibration.test.mjs tests/benchmark-record-validation-v3.test.mjs
558
+ ```
559
+
560
+ `PIAGENT_NO_UPDATE_CHECK` hoặc tên `--offline` không tự là sandbox mạng. Kiểm tra runner không hydrate auth, không gọi real provider, không dùng global state người dùng. `PIAGENT_REAL_PI_HOST` nếu test cần phải là **đường dẫn runtime đã xác thực**, không phải giá trị `1`.
561
+
562
+ Không chạy ngay `npm run benchmark:deep` hoặc các script có auth-writeback; chúng không phải phép kiểm tra an toàn mặc định cho plan này.
563
+
564
+ ## 16. Evidence, checkpoint và báo cáo tiến độ
565
+
566
+ ### 16.1. Evidence tối thiểu, không tạo report trùng lặp
567
+
568
+ Mỗi issue/phase lưu command thật, exit code, source/config hashes, test scope, observed result, expected result và đường dẫn log. Hash bằng SHA-256; không chỉ hash một report tự kể lại kết quả.
569
+
570
+ Artifact mới có timestamp; không sửa evidence đã sealed. Transcript/auth/keys giữ private và không đưa vào Git. Synthetic fixtures không trộn paid records. File count không thay cho content digest.
571
+
572
+ ### 16.2. Checkpoint dùng khi pause/chuyển session
573
+
574
+ ```json
575
+ {
576
+ "planId": "PRB-108-2026-09-06",
577
+ "phase": "R0",
578
+ "status": "not_started",
579
+ "candidate": {
580
+ "commit": null,
581
+ "tree": null,
582
+ "packageDigest": null,
583
+ "suiteDigest": null,
584
+ "configurationDigest": null
585
+ },
586
+ "authority": {
587
+ "d026ApprovalRecorded": true,
588
+ "candidateRebindApproved": false,
589
+ "paidDispatchGateSatisfied": false
590
+ },
591
+ "checks": {
592
+ "lastCanonicalResult": null,
593
+ "blockingIssueIds": [],
594
+ "evidenceManifest": null
595
+ },
596
+ "execution": {
597
+ "liveProcesses": [],
598
+ "campaignId": null,
599
+ "started": null,
600
+ "accepted": null,
601
+ "unknown": null
602
+ },
603
+ "nextAction": "Verify current source and authority before implementation"
604
+ }
605
+ ```
606
+
607
+ Đây là template, không phải receipt đã thực thi. `null` nghĩa chưa xác minh, không phải zero. Session phải điền PID/lock/campaign thực khi có; không lưu secret.
608
+
609
+ ### 16.3. Mẫu cập nhật ngắn cho operator
610
+
611
+ - Đang ở phase/issue nào.
612
+ - Hành vi nào vừa được chứng minh hoặc sửa, bằng test nào.
613
+ - Gate nào còn đỏ và thuộc runtime, measurement hay product.
614
+ - Provider sessions đã phát sinh trong lượt này; nếu 0 thì ghi 0.
615
+ - Một next action cụ thể; chỉ hỏi operator khi thiếu quyền hoặc lựa chọn thực sự.
616
+
617
+ Không nói “gần xong” chỉ vì test hẹp xanh. Không hứa ngày chạy benchmark nếu source/authority/full gate chưa đóng.
618
+
619
+ ## 17. Checklist operator nên chốt
620
+
621
+ - [x] Nhận plan này làm execution plan chuyên biệt, liên kết với POR thay vì restart toàn P0–P10.
622
+ - [x] Giữ single-agent và ưu tiên candidate tối thiểu; không đổi harness nền tảng.
623
+ - [x] Duyệt Decision A-v1 A-CORE/A-GRADER và tiếp tục offline sau allowlist/preservation; A-SEM chưa chọn.
624
+ - [x] Không bật independent authority hoặc đổi grader/treatment ngầm. Những thay đổi thật được trình cùng Decision A hoặc rebind thích hợp.
625
+ - [ ] Chỉ duyệt Decision B khi có qualification và exact candidate/config/suite binding; không tăng cap tự động.
626
+ - [ ] Chấp nhận `FAIL_VALID` là kết quả đo trung thực nhưng không phải sản phẩm đạt mục tiêu; không yêu cầu sửa giữa campaign để đạt PASS.
627
+ - [ ] Dành product acceptance dự án thật cho đợt riêng, không làm nó thành điều kiện mới khiến R7 tiếp tục bị trì hoãn.
628
+
629
+ ## 18. Prompt bàn giao cho session mới
630
+
631
+ Copy đoạn sau nếu muốn session mới tiếp nhận và lập quyết định triển khai trước khi sửa:
632
+
633
+ ```text
634
+ Tiếp nhận kế hoạch PRB-108-2026-09-06 cho Piagent.
635
+
636
+ Implementation repo duy nhất:
637
+ /Users/vtamm/Documents/piagent-35-recovery-20260831T090020Z/implementation
638
+
639
+ Đọc AGENTS.md, toàn bộ:
640
+ /Users/vtamm/Documents/piagent-35-recovery-20260831T090020Z/implementation/docs/piagent-runtime-benchmark-execution-plan.md
641
+ và Plan of Record được dẫn trong đó trước khi hành động.
642
+
643
+ Tôi nhận kế hoạch này để tiếp tục ở session mới. Trước mắt chỉ thực hiện R0–R1:
644
+ xác minh checkpoint/source/custody/quyền, tái dùng finite issue register đã có,
645
+ đề xuất candidate tối thiểu cùng dependency closure, contract và disposition
646
+ từng lỗi. Báo lại Decision A cụ thể trước khi thay đổi source/treatment.
647
+
648
+ Không restart P0–P10, không spawn subagent, không tạo worktree, không đổi
649
+ harness nền tảng, không stash/reset/discard recovery work. Không gọi provider,
650
+ không reserve campaign, push hoặc publish. Không đọc secret để tìm evidence.
651
+
652
+ D-026 đã duyệt nhưng khóa candidate cũ; không tự áp approval đó cho candidate
653
+ mới. Giữ run-6 immutable. Runtime đã có continuation maximum 1: không thêm
654
+ bộ đếm trùng lặp. Không biến unsupported thành completed hoặc dùng test
655
+ handoff xanh để xóa test correct-completion đỏ.
656
+
657
+ Kết thúc R1 bằng một đề xuất có thể duyệt: các file/hunk cần đưa vào candidate,
658
+ cách bảo toàn phần còn lại, những contract/quyền cần đổi nếu có, các gate phải
659
+ đạt và next action cụ thể. Cập nhật checklist/checkpoint, không chỉ report lại
660
+ blocker cũ. Chưa thực hiện R2–R7 khi chưa có quyền tương ứng.
661
+ ```
662
+
663
+ Khi muốn cho session mới sửa offline sau khi xem Decision A, operator có thể duyệt đúng proposal đó và cho tiếp tục R2–R6; không cần duyệt từng test. Paid R7 vẫn theo Decision B và các gate thật.
664
+
665
+ ## 19. Nhật ký kế hoạch
666
+
667
+ | Phiên bản | Ngày | Nội dung |
668
+ | --- | --- | --- |
669
+ | 1.16 | 2026-09-06 | Worker v4 bounded identity hashing closes configured NDJSON timeout:46controls/4actual PASS. Docs exact-command/current-source receipt:6native/268composite PASS; full docs chain/expiry/full/B open. |
670
+ | 1.15 | 2026-09-06 | API migrations and configured checkpoint/abort pass; retained7/3 and2/1 followups identify NDJSON guest wall limit, docs exact-command and expiry API gaps; final full/B open. |
671
+ | 1.14 | 2026-09-06 | Explicit host API comparison closes observed tenant false completion and invoice/dedup positive gaps;82controls/10actual PASS; remaining migrations/docs/full/B open. |
672
+ | 1.13 | 2026-09-06 | Replay executor structuredClone gap sửa có versioned worker;34controls và3actual variants đạt, recover0model; API/docs/full/B vẫn mở. |
673
+ | 1.12 | 2026-09-06 | Tenant/revocation/billing/CSV/retry configured có positive và controls; API routing/checker identity sửa có RED→GREEN; replay thiếu structuredClone xác định trực tiếp; API/docs/full/B vẫn mở. |
674
+ | 1.11 | 2026-09-06 | X1 phục hồi có hash; chat/workspace/pagination configured có positive và negative controls; sửa workflow replay và false verifier-command coverage. Docs/atomic/full/B vẫn mở,0provider. |
675
+ | 1.10 | 2026-09-06 | Workflow configured actual SDK/worker đúng hoàn tất đủ3turns; sai-test-xanh và unsupported bị chặn hữu hạn. Native-only chỉ cho read-only request set, wrong-scope control đạt. R5 đủ108 trên identity trước delta; full/B vẫn mở. |
676
+ | 1.9 | 2026-09-06 | R5 actual shared schedule đủ108accepted/54pairs/4mốc,0unknown main; bảo toàn32quality failures và8safe refusals,0provider. |
677
+ | 1.8 | 2026-09-06 | Operator duyệt A-v2:pagination N, exact R5 exception và configured independent verification/finite fixes. R5 patch đã áp,0provider; R4/full history giữ nguyên, B riêng. Evidence091158Z |
678
+ | 1.7 | 2026-09-06 | Hoàn tất R4-08:27/54,55/55fresh disk readback sau connection/supervisor close; cùng revision giữ37PASS/18FAIL. Test helpers vàgenerated/docs đồng bộ; core/suite không đổi,0provider. Evidence083952Z |
679
+ | 1.6 | 2026-09-06 | R5 fulljourney/coldreadback4chains và reader13controls đạt; sửa timeout nhầm custom delivery receipt, giữrefused vàusage.26finite rows; full108/P5/B cònmở,0provider. Evidence081322Z |
680
+ | 1.5 | 2026-09-06 | Operator nhắc tiếp tục A không hỏi lại; chuẩn bị patch R5 hai runner files, normalized-loop/syntax checks đạt; auto-review từ chối2lần vì phạm vi harness. Chưa áp source,0runtime tests/0provider; checkpoint073448Z và quyền cụ thể còn mở |
681
+ | 1.4 | 2026-09-06 | Blocked audit ba lượt:current87source/parent evidence/run6 custody khớp; không còn bounded fix/check mới hoặc live process. Chờ A-SEM, giữ positive/P5/full108/B gates;0tests/0provider mới, không đánh dấu mục tiêu hoàn tất |
682
+ | 1.3 | 2026-09-06 | Final-candidate quality/accounting2/2 và actual production/offline boundary kiểm đúng;0provider, source sản phẩm không đổi. R5 full108 integration vẫn thiếu; positive/full/B gates giữ nguyên. Evidence benchmark-validity-recovery-20260906T064300Z |
683
+ | 1.2 | 2026-09-06 | A-v1 được xác nhận và áp selection15file có preservation; bounded reference/grader/routing/docs fixes và closure; calibration34/34, review5/5, fault109/109, browser22/22. R4 coverage27/54 còn18 positive FAIL; full108 replay/P5/rebind chưa đạt,0provider; report40/checkpoint46 |
684
+ | 1.1 | 2026-09-06 | Operator nhận plan và chỉ authorize R0–R1; xác minh95/95 source, bảo toàn96 file, candidate A-v1/25 finite dispositions/threshold mapping; Codex PATH hash drift mới; Decision A chờ duyệt. Chỉ docs/evidence,0 tests / 0 provider; không source selection/R2–R7 |
685
+ | 1.0 | 2026-09-06 | Tạo plan riêng và prompt bàn giao; chốt R0–R8, hai điểm quyết định, giữ D-026 và evidence cũ; chưa sửa runtime, chạy qualification hoặc gọi provider |