@zhivex-ai/harness 1.0.0-rc.7 → 1.0.0

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 (170) hide show
  1. package/CHANGELOG.md +190 -0
  2. package/README.md +47 -62
  3. package/ROADMAP.md +15 -6
  4. package/SECURITY.md +1 -1
  5. package/benchmarks/README.md +48 -0
  6. package/benchmarks/baselines/context-navigation-2026-09-09.json +94 -0
  7. package/benchmarks/baselines/efficiency-2026-09-08.json +233 -0
  8. package/benchmarks/baselines/external-final-2026-09-08.json +588 -0
  9. package/benchmarks/baselines/external-intermediate-2026-09-08.json +116 -0
  10. package/benchmarks/baselines/external-matched-openai-2026-09-08.json +1922 -0
  11. package/benchmarks/baselines/external-matched-qwen-2026-09-08.json +1706 -0
  12. package/benchmarks/baselines/external-pilot-2026-09-08.json +439 -0
  13. package/benchmarks/baselines/external-qwen-flash-2026-09-08.json +1570 -0
  14. package/benchmarks/baselines/external-qwen-remediation-2026-09-09.json +1509 -0
  15. package/benchmarks/baselines/external-qwen-sdk-114-progress-2026-09-09.json +2509 -0
  16. package/benchmarks/baselines/external-sdk-upgrade-2026-09-08.json +564 -0
  17. package/benchmarks/baselines/external-verifier-recovery-2026-09-09.json +794 -0
  18. package/benchmarks/baselines/full-harness-review-2026-09-10.json +134 -0
  19. package/benchmarks/baselines/harness-audit-2026-09-09.json +136 -0
  20. package/benchmarks/baselines/harness-remediation-2026-09-09.json +160 -0
  21. package/benchmarks/baselines/oci-remediation-2026-09-10.json +535 -0
  22. package/benchmarks/baselines/rc14-holdout-2026-09-10.json +854 -0
  23. package/benchmarks/baselines/repair-architecture-audit-2026-09-09.json +75 -0
  24. package/benchmarks/baselines/time-to-safe-fix-live-expanded-2026-08-21.json +186 -0
  25. package/benchmarks/baselines/time-to-safe-fix-live-smoke-2026-08-21.json +186 -0
  26. package/contracts/public-api.json +25 -0
  27. package/contracts/security-controls.json +3 -2
  28. package/contracts/stable-api-signatures.json +58 -54
  29. package/dist/bounded-reads.d.ts +4 -0
  30. package/dist/change-envelope.d.ts +4 -4
  31. package/dist/cli-options.d.ts +2 -1
  32. package/dist/cli-profiles.d.ts +39 -0
  33. package/dist/cli-stream.d.ts +40 -40
  34. package/dist/cli.d.ts +38 -35
  35. package/dist/cli.js +6556 -4030
  36. package/dist/compaction.d.ts +12 -0
  37. package/dist/config.d.ts +6 -1
  38. package/dist/console-context.d.ts +26 -0
  39. package/dist/console-input.d.ts +28 -0
  40. package/dist/context-engineering.d.ts +5 -5
  41. package/dist/context-metrics.d.ts +11 -0
  42. package/dist/edit-contracts.d.ts +2 -2
  43. package/dist/execution-environment.d.ts +9 -5
  44. package/dist/harness.d.ts +52 -18
  45. package/dist/hostile-repository-demo.js +2942 -1088
  46. package/dist/index.d.ts +3 -3
  47. package/dist/index.js +4316 -2435
  48. package/dist/json-contracts.d.ts +292 -236
  49. package/dist/model-budget.d.ts +61 -0
  50. package/dist/operations.d.ts +82 -20
  51. package/dist/orchestration.d.ts +1 -0
  52. package/dist/providers.d.ts +5 -2
  53. package/dist/repair-controller.d.ts +72 -0
  54. package/dist/repair-progress.d.ts +40 -0
  55. package/dist/repair-verifier.d.ts +6 -0
  56. package/dist/replacement-edits.d.ts +9 -0
  57. package/dist/routing.d.ts +1 -1
  58. package/dist/run-interruption.d.ts +4 -0
  59. package/dist/runtime-checkpoints.d.ts +7 -0
  60. package/dist/runtime-diagnostics.d.ts +63 -0
  61. package/dist/runtime-policy.d.ts +36 -0
  62. package/dist/sessions.d.ts +1 -1
  63. package/dist/state-backup.d.ts +2 -2
  64. package/dist/task-memory.d.ts +36 -0
  65. package/dist/terminal-markdown.d.ts +12 -0
  66. package/dist/time-to-safe-fix.d.ts +19 -19
  67. package/dist/tool-registry.d.ts +4 -0
  68. package/dist/verify-historical-migrations.js +6987 -5140
  69. package/dist/workspace-mutation-lock.d.ts +5 -0
  70. package/dist/workspace.d.ts +39 -4
  71. package/dist/zhx.js +6556 -4030
  72. package/docs/CLI.md +89 -3
  73. package/docs/CONTEXT_ENGINEERING.md +160 -0
  74. package/docs/EXECUTION_ENVIRONMENTS.md +21 -0
  75. package/docs/EXTENSIBILITY.md +2 -2
  76. package/docs/GA_READINESS.md +13 -7
  77. package/docs/LIVE_CERTIFICATION.md +12 -2
  78. package/docs/RC13_SECURITY_REVIEW.md +28 -0
  79. package/docs/RC14_DELEGATED_SECURITY_DECISION.md +80 -0
  80. package/docs/RC14_SECURITY_REVIEW.md +40 -0
  81. package/docs/README.md +33 -0
  82. package/docs/RELEASE.md +4 -2
  83. package/docs/REPOSITORY_EDITING.md +47 -0
  84. package/docs/SECURITY_REVIEW_EVIDENCE.md +5 -3
  85. package/docs/THREAT_MODEL.md +3 -3
  86. package/docs/TIME_TO_SAFE_FIX.md +4 -4
  87. package/docs/ga-readiness.json +147 -16
  88. package/docs/reports/EFFICIENCY_REVIEW.md +156 -0
  89. package/docs/reports/EXTERNAL_COMPARISON.md +434 -0
  90. package/docs/reports/FULL_HARNESS_REVIEW_2026-09-10.md +200 -0
  91. package/docs/reports/GA_BUDGET_REMEDIATION_2026-09-19.md +38 -0
  92. package/docs/reports/GA_REPAIR_RECOVERY_2026-09-19.md +700 -0
  93. package/docs/reports/GA_VALIDATION_2026-09-19.md +111 -0
  94. package/docs/reports/HARNESS_ARCHITECTURE_REVIEW_2026-09-09.md +202 -0
  95. package/docs/reports/HARNESS_AUDIT_2026-09-09.md +306 -0
  96. package/docs/reports/HARNESS_REMEDIATION_2026-09-09.md +74 -0
  97. package/docs/reports/HARNESS_REMEDIATION_2026-09-10.md +90 -0
  98. package/docs/reports/MODEL_COMPARISON_2026-09-09.md +184 -0
  99. package/docs/reports/QWEN_REMEDIATION_COMPARISON_2026-09-09.md +142 -0
  100. package/docs/reports/RC14_VALIDATION_2026-09-10.md +45 -0
  101. package/docs/reports/README.md +26 -0
  102. package/docs/reports/evidence/ga-budget-remediation-2026-09-19.json +133 -0
  103. package/docs/reports/evidence/ga-catalog-ablation-2026-09-19.json +699 -0
  104. package/docs/reports/evidence/ga-catalog-ablation-plan-2026-09-19.json +40 -0
  105. package/docs/reports/evidence/ga-catalog-observed-2026-09-19.json +985 -0
  106. package/docs/reports/evidence/ga-catalog-observed-plan-2026-09-19.json +28 -0
  107. package/docs/reports/evidence/ga-catalog-observed-status-2026-09-19.json +15 -0
  108. package/docs/reports/evidence/ga-complete-local-check-2026-09-19.json +47 -0
  109. package/docs/reports/evidence/ga-completion-reminder-2026-09-19.json +22 -0
  110. package/docs/reports/evidence/ga-fresh-cohort-plan-2026-09-19.json +54 -0
  111. package/docs/reports/evidence/ga-fresh-cohort-preparation-2026-09-19.json +242 -0
  112. package/docs/reports/evidence/ga-fresh-cohort-result-2026-09-19.json +4318 -0
  113. package/docs/reports/evidence/ga-local-validation-followup-2026-09-19.json +66 -0
  114. package/docs/reports/evidence/ga-node-consumers-2026-09-19.json +31 -0
  115. package/docs/reports/evidence/ga-package-content-validation-2026-09-19.json +22 -0
  116. package/docs/reports/evidence/ga-plan-completion-2026-09-19.json +39 -0
  117. package/docs/reports/evidence/ga-plan-reserve-2026-09-19.json +573 -0
  118. package/docs/reports/evidence/ga-plan-reserve-plan-2026-09-19.json +24 -0
  119. package/docs/reports/evidence/ga-plan-transition-2026-09-19.json +19 -0
  120. package/docs/reports/evidence/ga-private-verifier-plan-2026-09-19.json +24 -0
  121. package/docs/reports/evidence/ga-private-verifier-root-cause-2026-09-19.json +41 -0
  122. package/docs/reports/evidence/ga-published-sdk-2026-09-19.json +35 -0
  123. package/docs/reports/evidence/ga-python-checkout-imports-2026-09-19.json +95 -0
  124. package/docs/reports/evidence/ga-python-origin-delivery-2026-09-19.json +211 -0
  125. package/docs/reports/evidence/ga-python-origin-delivery-plan-2026-09-19.json +27 -0
  126. package/docs/reports/evidence/ga-qwen-patched-package-2026-09-19.json +1092 -0
  127. package/docs/reports/evidence/ga-qwen-patched-package-plan-2026-09-19.json +18 -0
  128. package/docs/reports/evidence/ga-qwen-published-2026-09-19.json +571 -0
  129. package/docs/reports/evidence/ga-qwen-published-plan-2026-09-19.json +18 -0
  130. package/docs/reports/evidence/ga-qwen-tool-choice-2026-09-19.json +85 -0
  131. package/docs/reports/evidence/ga-qwen-tool-choice-patched-2026-09-19.json +85 -0
  132. package/docs/reports/evidence/ga-recovery-development-2026-09-19.json +1066 -0
  133. package/docs/reports/evidence/ga-recovery-graded-development-2026-09-19.json +1313 -0
  134. package/docs/reports/evidence/ga-recovery-graded-v2-2026-09-19.json +1151 -0
  135. package/docs/reports/evidence/ga-recovery-v3-2026-09-19.json +3943 -0
  136. package/docs/reports/evidence/ga-recovery-v4-2026-09-19.json +1055 -0
  137. package/docs/reports/evidence/ga-recovery-v5-2026-09-19.json +1245 -0
  138. package/docs/reports/evidence/ga-recovery-v6-2026-09-19.json +699 -0
  139. package/docs/reports/evidence/ga-recovery-v7-2026-09-19.json +854 -0
  140. package/docs/reports/evidence/ga-recovery-v8-2026-09-19.json +596 -0
  141. package/docs/reports/evidence/ga-required-delivery-2026-09-19.json +25 -0
  142. package/docs/reports/evidence/ga-required-delivery-live-2026-09-19.json +1337 -0
  143. package/docs/reports/evidence/ga-required-delivery-live-plan-2026-09-19.json +25 -0
  144. package/docs/reports/evidence/ga-retained-candidate-grading-2026-09-19.json +30 -0
  145. package/docs/reports/evidence/ga-tool-selection-live-2026-09-19.json +559 -0
  146. package/docs/reports/evidence/ga-tool-selection-live-plan-2026-09-19.json +28 -0
  147. package/docs/reports/evidence/ga-tool-selection-recovery-2026-09-19.json +27 -0
  148. package/docs/reports/evidence/ga-validation-2026-09-19.json +236 -0
  149. package/docs/reports/evidence/ga-verifier-discovery-live-2026-09-19.json +1369 -0
  150. package/docs/reports/evidence/ga-verifier-discovery-plan-2026-09-19.json +29 -0
  151. package/docs/reports/evidence/ga-verifier-failure-identification-2026-09-19.json +30 -0
  152. package/docs/reports/evidence/ga-verifier-feedback-2026-09-19.json +65 -0
  153. package/docs/reports/evidence/ga-verifier-hints-live-2026-09-19.json +1297 -0
  154. package/docs/reports/evidence/ga-verifier-hints-plan-2026-09-19.json +27 -0
  155. package/docs/reports/evidence/ga-work-boundary-context-analysis-2026-09-19.json +113 -0
  156. package/docs/reports/evidence/ga-work-boundary-live-2026-09-19.json +301 -0
  157. package/docs/reports/evidence/ga-work-boundary-live-plan-2026-09-19.json +84 -0
  158. package/docs/reports/evidence/ga-work-budget-planning-2026-09-19.json +32 -0
  159. package/docs/reports/evidence/ga-working-context-2026-09-19.json +22 -0
  160. package/docs/reports/evidence/rc14-delegated-security-review-2026-09-20.json +81 -0
  161. package/docs/reports/evidence/rc14-ga-gate-2026-09-20.json +18 -0
  162. package/docs/reports/evidence/rc14-representative-2026-09-20.json +509 -0
  163. package/docs/reports/evidence/rc14-security-regressions-2026-09-20.json +64 -0
  164. package/docs/reports/evidence/security-current-2026-09-19.json +91 -0
  165. package/docs/reports/evidence/security-remediation-2026-09-19.json +97 -0
  166. package/evaluations/repair-controller-experiment.json +24 -0
  167. package/evaluations/representative-assembly-matrix.json +63 -0
  168. package/evaluations/representative-matrix.json +2219 -2
  169. package/fixtures/contracts/v1/init.json +19 -0
  170. package/package.json +25 -16
package/docs/CLI.md CHANGED
@@ -1,11 +1,59 @@
1
1
  # CLI contract
2
2
 
3
- Zhivex Harness `0.11.x` is Node-first and exposes a durable agent console, bounded project context, offline change-envelope operations, plus versioned JSON documents and JSON Lines events for automation. Bun remains a supported target-repository package manager and contributor tool.
3
+ The Zhivex Harness `1.0` candidate is Node-first and exposes a durable agent console, explicit personal provider/model profiles, bounded project context, offline change-envelope operations, plus versioned JSON documents and JSON Lines events for automation. Bun remains a supported target-repository package manager and contributor tool.
4
4
 
5
5
  ## Commands
6
6
 
7
+ ### Interactive daily workflow
8
+
9
+ The console completes slash-command prefixes with Tab. `/paste` captures a bounded
10
+ multiline draft: finish with `.end` on a separate line, review the preview, then type
11
+ `send` at the separate confirmation prompt. Slash commands inside the draft remain
12
+ literal model input. Use this mode for multiline clipboard content. Lines arriving
13
+ without an active question are discarded, including surplus lines after a task or
14
+ approval answer; they are never queued as future approvals. Input history is not
15
+ saved to disk or shared with approval questions. Up/Down recall the last 100 task
16
+ prompts in this process (at most 256 KiB); `/clear` and session switches clear them.
17
+ Alt+Enter inserts a newline without submitting. Drafts are limited to 64 KiB.
18
+
19
+ `/context` displays the exact active project manifest, rule/context paths, digests,
20
+ and available skills. Skills are indexed for progressive loading; the list does not
21
+ claim every skill has already been loaded into the conversation.
22
+
23
+ Use `/attach <workspace-relative path>` to select an excerpt for the next task,
24
+ `/attachments` to inspect the selection, and `/detach [path]` to remove one or all.
25
+ Paths may contain spaces. Attachments use the existing secret-excluding workspace
26
+ reader, cover at most the first 400 lines per file, and are limited to eight files
27
+ and 64 KiB of excerpt text. They are explicitly labelled untrusted file data in the
28
+ model request. A changed digest requires reattachment before sending. Successful
29
+ turns, `/clear`, and session switches clear the pending selection; errors retain it.
30
+ Attachments are sent to the selected provider with the next ordinary task, not to
31
+ `/review`. They are not new project rules or a grant of tool authority.
32
+
33
+ Ctrl+C discards pending input, or signals the active model/review operation to stop
34
+ and waits for runtime cleanup. At an approval prompt it leaves the complete batch
35
+ pending. `/pending`, `/approve`, and `/deny` retain their durable meaning. Provider
36
+ and command errors return to the console with the saved run status instead of
37
+ closing the session. Interruption does not undo completed edits or replay tools;
38
+ use `/status` and `/diff` before continuing. The runtime's persisted terminal status
39
+ remains authoritative. An externally aborted ordinary turn that settles as failed
40
+ is recorded as `cancelled`; completed work, timeouts, and pending approvals retain
41
+ their status. Review groups retain the status reported by their group runtime.
42
+
43
+ `/diff` colors additions, removals, and hunk headers on eligible terminals, respects
44
+ `NO_COLOR`, and escapes untrusted terminal controls. Model text also escapes terminal
45
+ controls and renders bounded Markdown headings, emphasis, and fenced code on a
46
+ TTY; JSON/JSONL retain their existing data contracts.
47
+
48
+ Contributor validation: `bun run smoke:package` also runs a real PTY workflow
49
+ against the installed CLI, including approval recovery after process restart.
50
+ This Linux/macOS test requires Python 3 and injects a process-local fetch fixture;
51
+ it makes no provider requests. Run `python3 scripts/console-pty-smoke.py` after a
52
+ build to exercise the source artifact directly. Python is not a CLI dependency.
53
+
7
54
  ```text
8
55
  zhx
56
+ zhx init [--profile <name>] [--provider <id>] [--model <id>] [--json]
9
57
  zhx run --route reviewer=gemini [options] "task"
10
58
  zhx run --jsonl [options] "task"
11
59
  zhx chat [--continue|--session <sessionId>]
@@ -36,7 +84,24 @@ zhivex-harness --help
36
84
 
37
85
  Options are command-specific. The exported `CLI_COMMAND_OPTION_CONTRACTS` manifest is the machine source of truth for allowed, required, repeatable, and conflicting options. A known option used with the wrong command, a repeated scalar option, an invalid enum/range, or an unsupported option fails with `CLI_USAGE_INVALID` and exit code `2`; options are never silently ignored.
38
86
 
39
- The checked option inventory includes `--provider`, `--model`, `--workspace`, `--state-dir`, `--store`, `--tenant`, `--user`, `--namespace`, `--idempotency-key`, `--max-steps`, `--timeout-ms`, `--max-tool-calls`, `--max-tool-errors`, `--max-input-tokens`, `--max-output-tokens`, `--max-total-tokens`, `--input-cost-per-million`, `--output-cost-per-million`, and `--yes`, in addition to the command-specific flags documented below. The preparation gate rejects a help or documentation inventory that omits a declared option.
87
+ The checked option inventory includes `--provider`, `--model`, `--profile`, `--workspace`, `--state-dir`, `--store`, `--tenant`, `--user`, `--namespace`, `--idempotency-key`, `--max-steps`, `--timeout-ms`, `--max-tool-calls`, `--max-tool-errors`, `--max-input-tokens`, `--max-output-tokens`, `--max-total-tokens`, `--input-cost-per-million`, `--output-cost-per-million`, and `--yes`, in addition to the command-specific flags documented below. The preparation gate rejects a help or documentation inventory that omits a declared option.
88
+
89
+ ## First-run initialization and profiles
90
+
91
+ `zhx init` creates one explicit personal profile. In a terminal it asks for provider and model when they are not supplied; in scripts it uses flags, environment values, and deterministic provider defaults. The default profile name is `default`.
92
+
93
+ ```bash
94
+ zhx init
95
+ zhx init --profile daily --provider qwen --model qwen3.8-max
96
+ zhx doctor --profile daily
97
+ zhx --profile daily "inspect this repository"
98
+ ```
99
+
100
+ Profile schema `1` contains exactly `schemaVersion`, `provider`, and `model`. It cannot contain credentials, endpoints, approval policy, workspace/state scope, MCP, checks, OCI policy, routes, or subagents. Files are stored outside the repository under the platform user configuration directory (`~/Library/Application Support/zhivex-harness/profiles` on macOS, `${XDG_CONFIG_HOME:-~/.config}/zhivex-harness/profiles` on Linux, and `%APPDATA%/zhivex-harness/profiles` on Windows). `ZHIVEX_HARNESS_CONFIG_DIR` is an explicit absolute-path override for isolated automation and tests.
101
+
102
+ Profile names use 1–64 letters, digits, dots, underscores, or hyphens. Directories must not be writable by group or others; files are created with mode `0600`, read through a no-follow descriptor, limited to 16 KiB, and rejected when linked, malformed, over-permissive, or already present. Initialization never asks for or stores an API key; it reports only the accepted credential variable names and whether one is present.
103
+
104
+ Profiles have no implicit active/default selection. `--profile <name>` is accepted only by `run`, `chat`, `review`, and `doctor`; it is intentionally rejected by `resume` because an existing run restores its exact persisted configuration. Precedence is `explicit CLI flag > explicitly selected profile > ZHIVEX_HARNESS_* environment > built-in default`.
40
105
 
41
106
  ## Interactive console
42
107
 
@@ -131,7 +196,7 @@ All structured documents include:
131
196
  ```json
132
197
  {
133
198
  "schemaVersion": 1,
134
- "kind": "providers | doctor | run-result | review-group | run-list | run-inspection | run-export | run-cancellation | run-cleanup | session-list | session | change-envelope | change-envelope-verification | state-status | state-export | state-import | error"
199
+ "kind": "init | providers | doctor | run-result | review-group | run-list | run-inspection | run-export | run-cancellation | run-cleanup | session-list | session | change-envelope | change-envelope-verification | state-status | state-export | state-import | error"
135
200
  }
136
201
  ```
137
202
 
@@ -153,4 +218,25 @@ The event projector allowlists safe fields. Text deltas and token usage are reta
153
218
 
154
219
  Resolved library configuration includes `schemaVersion: 5`, an explicit `allowedChecks` array, `storeBackend`, `scope`, parent `budget`, `compaction`, `requiredCapabilities`, project `context`, optional `mcpConfigPath`, an `orchestration` object with profiles, child budget/timeout, and review concurrency, and a discriminated `execution` policy. The check default is `test`, `typecheck`, `lint`, and `build`; `--allow-check` or `ZHIVEX_HARNESS_ALLOWED_CHECKS` replaces that set. Execution defaults to `{ backend: "none" }`; an OCI policy records the runtime, image, allowed entrypoints, shell mode, and every resource ceiling. Passing a different explicit schema version fails before a model or tool can run. During `0.x`, a minor release may add a new schema version with a documented migration; patch releases remain compatible.
155
220
 
221
+ Personal CLI profile schema `1` is separate from resolved Harness configuration schema `5`. Selecting a profile only supplies provider/model input before normal resolution; it does not change persisted run schemas, execution fingerprints, project-context discovery, or migration guarantees.
222
+
156
223
  The default state directory is `<workspace>/.zhivex-harness/runs` and the default backend is scoped SQLite at `operations.sqlite`. Explicit external state directories are supported, but the workspace root, filesystem root, sensitive workspace paths, regular files, and symbolic-link targets are rejected before the run store is created. See [DURABLE_OPERATIONS.md](./DURABLE_OPERATIONS.md) for state migration and operations, and [EXTENSIBILITY.md](./EXTENSIBILITY.md) for capability, MCP, subagent, and review-group configuration.
224
+
225
+ ### Runtime repair policy
226
+
227
+ `--agent-profile <strict|repair>` selects the runtime policy (default `strict`;
228
+ `ZHIVEX_HARNESS_AGENT_PROFILE` provides the environment default). `repair` enables
229
+ bounded schema/tool recovery, cumulative model accounting, exploration controls,
230
+ and up to two retries of recoverable approved verifier failures. A successful
231
+ approved verification/import can finish from its durable receipt. It does not
232
+ auto-approve tools, bypass checks, or recover cancellations/integrity violations.
233
+ The selected profile is persisted in resume configuration and the harness binding.
234
+
235
+ ```sh
236
+ bun run src/cli.ts run "Fix the regression and verify it" --agent-profile repair --execution oci
237
+ ```
238
+
239
+ Library callers select `agentProfile: "repair"` in `createHarness` and can observe
240
+ bounded timings/accounting with `runHarness(..., { onDiagnostics })`. Telemetry
241
+ observer exceptions do not alter the execution result. A stricter caller can
242
+ explicitly override tool-error behavior or terminal receipt settings.
@@ -75,3 +75,163 @@ Repository manifests cannot register executable code. Project-selected executabl
75
75
  Context/rule/skill digests and trusted hook identities form part of the durable harness binding. Changing them intentionally prevents a paused run from resuming under different instructions. Complete or deny the old run with the artifact and context that created it, then start a new run.
76
76
 
77
77
  Version `0.11.x` advances the resolved configuration schema from `4` to `5`. Existing SQLite state remains readable, but paused `0.10.x` approvals must be completed or denied with the matching artifact because project instructions and trusted hook identities are now part of the run fingerprint. Library cleanup should `await harness.close()` so the final lifecycle event and environment release complete.
78
+
79
+ ## Bounded conversation evidence
80
+
81
+ File slices now return at most 16,000 content characters; a batched read shares
82
+ 32,000 characters across its slices. The full-file digest is unchanged. `endLine`
83
+ identifies the last returned line so ordinary reads can continue from the next line.
84
+ `clippedLine: true` marks an overlong individual line whose text is incomplete; do
85
+ not treat that clipped text as the entire source line. Search an exact file to locate
86
+ relevant short excerpts instead of repeatedly reading a large file.
87
+
88
+ Conversation compaction uses `bounded-evidence-v3`. It retains a redacted excerpt of
89
+ the initial user objective, recent conversation excerpts, bounded local-tool path
90
+ and digest evidence, and a separate short history of check exit codes, timeouts,
91
+ and tool failures. These are recollections, not approvals or verification receipts.
92
+ The latest four check/error records are kept independently of ordinary file-read
93
+ noise. The latest three subsequent user excerpts are retained separately from
94
+ assistant chatter, redacted and bounded to 512 characters each. They share the
95
+ existing total summary budget and remain untrusted context. Interactive summaries
96
+ can carry this structure across subsequent compactions.
97
+
98
+ The summary additionally preserves up to eight deduplicated navigation references
99
+ from successful local searches and reads, including nested `search_many` and
100
+ `read_files` results: relative file path, observed digest, returned line range and
101
+ the clipped-line flag for reads. A newly observed digest replaces older references
102
+ for that file. The same 4,000-character total cap applies; references compete with
103
+ other recollections for space. Earlier v1/v2 summaries remain readable as untrusted
104
+ context, and every recalled reference is validated again.
105
+
106
+ These historical references help select the next focused read. They do not retain
107
+ source text, search queries, current-file guarantees or editing authority. The agent
108
+ must still read current source before constructing an exact replacement. No model
109
+ token reduction or SWE-bench improvement is established by retention tests alone.
110
+
111
+ Raw source, tool arguments, stdout/stderr, free-form errors and external MCP results
112
+ are not copied into evidence. Sensitive file paths are excluded. Summaries are
113
+ lossy: omitted material is flagged, and the runtime summary is capped at 4,000
114
+ characters and a source-relative budget. Exact failure diagnostics still require
115
+ reading the original durable run or rerunning the check. This does not infer a
116
+ semantic task plan or guarantee retention of every earlier user constraint.
117
+
118
+ The strategy identity participates in the durable harness fingerprint. Paused runs
119
+ created with the previous compactor must be completed or denied with their matching
120
+ artifact; they cannot silently resume under the changed context behavior.
121
+
122
+ Run `bun run evaluate:continuity` for deterministic retention, redaction, and agent
123
+ loop regressions. These checks do not measure model coding capability.
124
+
125
+ ## Task continuity and repair policy (audit remediation)
126
+
127
+ The `bounded-evidence-v4` summary remains lossy and bounded. Original operator
128
+ requests are stored separately in run metadata (`zhivexTaskSources`), redacted,
129
+ deduplicated by digest and limited to 64 requests / 256000 UTF-8 bytes. Exceeding
130
+ that bound is an explicit error. `read_task` reads 4000 characters at an offset
131
+ and lists source IDs; summaries do not replace the original acceptance criteria.
132
+ Interactive sessions retain this metadata across turns and durable resumes.
133
+ Manual compaction keeps a bounded summary in the prompt and retains redacted
134
+ operator sources separately. The CLI persists them in session/run metadata.
135
+ Library callers using `compactHarnessMessages` should pass its returned array
136
+ directly into `runHarness`; if serializing it separately, also retain the original
137
+ `zhivexTaskSources` metadata. A summary alone cannot reconstruct full requests.
138
+ `repair_plan` records the hypothesis, expected behavior, up to eight known paths,
139
+ and the next check in the durable tool journal. Its optional `verifier` records
140
+ exact `command`, `args` and a bounded `purpose`. Neither tool creates approval
141
+ or proof that a task is solved.
142
+
143
+ The optional `repair` runtime profile is shared by CLI, library and external
144
+ benchmark. Before each actual provider request it predicts the full message and
145
+ tool-schema context, reserves 30% of input/output allowance for closure, and caps
146
+ requested output to the current phase allowance. The predictor uses serialized
147
+ characters, not the provider tokenizer: actual billing can exceed a prediction.
148
+ All reported usage remains counted; missing usage blocks further paid requests.
149
+ Qwen Responses cannot accept an output cap: the existing route is preserved and
150
+ `outputCapApplied` is false, so a response may consume more than the reserved
151
+ allowance. Explicit Qwen Chat and other supported transports receive the cap.
152
+ Thinking-enabled Qwen gets a restricted catalogue with automatic tool choice
153
+ instead of an unsupported named choice; the same verifier-request limit applies.
154
+
155
+ After an edit, the application inspects the candidate and creates a mandatory
156
+ verification obligation. If a verifier was registered, the controller schedules
157
+ `verify_and_apply_environment_patch` through the normal SDK approval flow without
158
+ another provider request. Otherwise it offers a minimal verifier-selection
159
+ catalogue for at most two requests. Failed checks allow bounded recovery; a plain
160
+ final response cannot mark a pending candidate completed. Successful checks bind
161
+ the argv digest and purpose to the candidate revision, but a zero exit code does
162
+ not independently establish that the chosen check covers the user's requirement.
163
+ Host-mode edits require an approved `run_check` before completion.
164
+
165
+ Applications that require an actual repair can set `requireVerifiedDelivery: true`
166
+ when creating a Harness with `agentProfile: "repair"`. This creates a durable
167
+ completion obligation before exploration starts; a final answer without a
168
+ verified delivery is failed in both the result and saved checkpoint. The option
169
+ is bound to the run fingerprint and cannot be removed by restoring the controller
170
+ with defaults. It does not itself open the closure reserve or grant permission
171
+ for tools. Inspection-only callers leave it false. The SWE-bench driver enables
172
+ it because its task explicitly requires a verified repair and import.
173
+
174
+ A concrete repair plan also prevents completion before a candidate exists. If
175
+ the provider returns a normal final answer with a pending obligation and known
176
+ usage, the controller may schedule one read-only `read_task` reminder through the
177
+ ordinary tool gates. Its durable counter survives resume; it cannot extend the
178
+ verifier-selection limit or repeat indefinitely. The next model request still
179
+ uses the original token, step and tool budgets. The original response's usage
180
+ is preserved. Unknown usage, errors, cancellation and output-limit finishes do
181
+ not trigger this reminder. A second premature final answer remains a failed
182
+ repair, not a delivered result.
183
+
184
+ An OCI edit attempted without a concrete verifier is rejected before execution
185
+ and records a durable planning obligation. The next provider requests expose
186
+ only `repair_plan` and `read_task`, for at most two planning attempts; supported
187
+ modes explicitly request `repair_plan`. Execution checks also block unrelated
188
+ tools until a valid verifier is recorded. These restricted planning turns can
189
+ use the existing closure reserve after ordinary work reaches its ceiling;
190
+ they cannot exceed the total input/output budget. Resuming does not reset this limit.
191
+ Recording the verifier restores the ordinary catalogue, but never supplies
192
+ approval for the edit or check and does not increase the token budget.
193
+
194
+ The working-state message sent with each model request includes the normalized
195
+ planned file paths and remaining closure read/command allowances. This view
196
+ comes directly from the enforcing progress controller, including after restore;
197
+ it does not depend on keeping an old `repair_plan` tool result in compacted
198
+ history. These counters describe the existing closure limits, not extra budget
199
+ or approval. Displaying them does not itself activate closure.
200
+
201
+ Work/closure usage, phase, candidate, receipts and bounded measurements persist in
202
+ the SDK's own checkpoint writes, without separate competing revision updates.
203
+ An abandoned `running` checkpoint is treated as uncertain accounting on resume:
204
+ a process could have died after billing and before saving the result. Approval
205
+ pauses with complete accounting can resume normally. `runs inspect <runId> --json`
206
+ exposes allowlisted `runtimeDiagnostics` and an `effectiveRuntime` manifest. Old
207
+ runs without those diagnostics yield null. Diagnostics never include raw argv,
208
+ source, command output or prompts; purpose text is redacted.
209
+
210
+ At 70% of either actual cumulative token allowance, broad discovery pauses;
211
+ four further read calls and three command calls remain. Every `read_files` path
212
+ is checked against the normalized plan scope. Approved verification remains
213
+ subject to the run deadline, lease and tool budgets.
214
+
215
+ Primary and child definitions share the durable policy factory. Their manifests
216
+ identify the role, catalogue, budget and whether the primary closure controller
217
+ is installed. Read-only review groups and SDK-managed delegated runs do not gain
218
+ the primary transport scheduler; parent accounting still includes child usage
219
+ when `includeChildRuns` is enabled. This distinction remains explicit rather than
220
+ claiming identical repair execution across SDK entry points.
221
+
222
+ Read-only inspection does not reset duplicate tracking. Repeated identical
223
+ search evidence and fully overlapping read slices are suppressed on their third
224
+ observation; real reads still validate current bytes. Possible mutation/command
225
+ effects reset those hashes. Closure counters, known paths and bounded evidence
226
+ hashes survive SDK checkpoints in `zhivexRepairProgress`. Runtime read output is
227
+ limited to 32000 serialized characters per model step in this profile.
228
+
229
+ Changing the compaction strategy or runtime profile changes the harness binding.
230
+ Paused runs from an older binding must be completed/denied with their original
231
+ artifact; these changes deliberately do not reinterpret an old approval.
232
+
233
+ Repair mode returns an unknown tool selection to the model as `TOOL_NOT_REGISTERED`, just as invalid arguments receive structured feedback. It never resolves aliases or executes an unregistered tool. Existing tool-error, step and token limits bound recovery; callers can override `unknownToolMode` to `throw` or use `stopOnError`. Strict mode retains its fail-fast behavior, and subsequent mutations still require approval.
234
+
235
+ For required-delivery OCI runs, reaching the predicted work-budget boundary without a verifier transitions into the same durable two-attempt planning path before rejecting another exploration request. That request exposes only `repair_plan` and `read_task`. The estimate includes the working-state message and current tool catalogue; the budget gate recalculates after narrowing. This spends only the existing closure reserve, keeps total input/output ceilings, and neither executes nor approves a repair. Optional inspection runs do not gain access to the reserve.
236
+
237
+ Closure-reserve eligibility from this boundary is durable across checkpoints and remains active after recording the verifier, so planning can lead to an edit. A repair with an existing verifier can enter the same reserve. This does not replenish tokens, grant tool approval, or establish that a candidate satisfies the task.
@@ -131,6 +131,27 @@ Version `0.11.x` advances the execution policy to `2026-08-21-v4` and configurat
131
131
 
132
132
  Complete or deny paused `0.10.x` environment approvals with their original artifact. The new shell tool, context binding, and policy fingerprint intentionally prevent silent resume under a different authority surface; durable SQLite state remains readable without conversion.
133
133
 
134
+ ## Migration to scoped OCI identities
135
+
136
+ The GA candidate advances execution policy to `2026-09-19-v5-scoped-oci`.
137
+ Snapshot directories, runtime resources, and patch IDs bind the canonical workspace,
138
+ canonical state directory, run ID, and complete tenant/user/namespace scope.
139
+ Custom runtime adapters receive this opaque execution identity in `request.runId`;
140
+ the public Harness session retains the caller's run ID.
141
+
142
+ Legacy snapshots without scope are rejected. Complete or deny paused approvals
143
+ using their original artifact, or start a new run; do not rename old directories
144
+ or manufacture new metadata to resume them. CLI cleanup selects the configured
145
+ workspace and scope. Calling `cleanupHarnessExecutionArtifacts` without its
146
+ optional selection remains an administrative operation over the entire state root.
147
+
148
+ Harness workspace writers serialize digest validation, publication, and import
149
+ rollback across local processes using an owner-only SQLite lock outside the
150
+ repository. Linux and macOS are supported; an unavailable lock fails closed.
151
+ Process death releases ownership automatically. This coordinates cooperating
152
+ Harness writers, not arbitrary programs running as the same host user, and does
153
+ not make multi-file edits atomic across power loss.
154
+
134
155
  ## Certification
135
156
 
136
157
  The deterministic tests use an injected runtime to cover acquisition, secret exclusion, snapshot-only mutation, patch binding/import, separate and combined approvals, failed-verifier non-import, image-fingerprint resume rejection, release, and safe artifact cleanup. The installed-package smoke imports the public OCI API and proves that a consumer can perform the same snapshot/import flow.
@@ -8,11 +8,11 @@ Built-in registrations are Meta, Qwen, OpenAI, and Gemini. Each registration own
8
8
 
9
9
  Library callers can use `DEFAULT_PROVIDER_REGISTRY`, `BUILTIN_PROVIDER_REGISTRATIONS`, `createProviderRegistry`, or `DEFAULT_PROVIDER_REGISTRY.extend(...)`, then pass the registry to `resolveHarnessConfig`, `createProviderModel`, provider diagnostics, or `createHarness({ providerRegistry })`. Registration IDs, environment-variable names, defaults, diagnostics, and factories are validated before they become selectable.
10
10
 
11
- The coordinated SDK batch pins `@zhivex-ai/agents@1.3.0`, `@zhivex-ai/core@1.10.0`, `@zhivex-ai/meta@0.2.2`, `@zhivex-ai/qwen@0.10.2`, `@zhivex-ai/openai@0.10.0`, and `@zhivex-ai/gemini@0.10.5`. Qwen remains on the last adapter that passed the complete release-bound representative matrix; `0.10.3` failed closed before Harness could normalize provider tool-call IDs. A Core override keeps one runtime contract identity across every adapter.
11
+ The coordinated SDK batch pins `@zhivex-ai/agents@1.8.0`, `@zhivex-ai/core@1.22.0`, `@zhivex-ai/meta@0.2.6`, `@zhivex-ai/qwen@0.14.4`, `@zhivex-ai/openai@0.13.3`, and `@zhivex-ai/gemini@0.12.1`. Qwen `0.11.x` normalizes missing, placeholder, and continuation tool-call identifiers inside the adapter; Harness retains its deterministic provider-boundary normalizer as defense in depth until the exact candidate passes the complete release-bound representative matrix. A Core override keeps one runtime contract identity across every adapter, while Core `1.13.0` corrects compaction usage accounting and interaction-group retention. OpenAI `0.11.2` preserves synthetic assistant history in Responses, so the harness no longer requires its compaction transport or accounting workarounds.
12
12
 
13
13
  OpenAI is based on the GPT-5.6 family: `gpt-5.6-luna` is the default, with `gpt-5.6-terra` and `gpt-5.6-sol` available through `--model`. Availability remains organization-dependent while the upstream family is in limited preview, and the adapter uses the Responses API by default.
14
14
 
15
- Gemini defaults to `gemini-3.6-flash`, uses `GEMINI_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY`, and accepts optional `GEMINI_BASE_URL`. It is provisional until proposal/approval/restart, delegation, mixed routing, and OCI execution pass the credentialed harness live matrix; adapter-level evidence alone does not make the harness integration certified.
15
+ Gemini still defaults to `gemini-3.6-flash`, uses `GEMINI_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY`, and accepts optional `GEMINI_BASE_URL`. Adapter `0.11.0` adds modeled Gemini 3.7 and media/realtime surfaces, but the default and support level do not change implicitly. Gemini remains provisional until proposal/approval/restart, delegation, mixed routing, and OCI execution pass the credentialed Harness live matrix; adapter-level evidence alone does not make the Harness integration certified.
16
16
 
17
17
  ## Capability gate
18
18
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [`ga-readiness.json`](./ga-readiness.json) is the fail-closed source for the 1.0 promotion gate. `bun run readiness:1.0` validates the preparation assets on every change. `bun run readiness:1.0:release` is intentionally red until all blockers are closed, the security and representative evaluation evidence is complete and recent, two published RCs have zero known contract-breaking defects, and `package.json` is exactly `1.0.0`.
4
4
 
5
- RC evidence is not accepted on self-report alone. The ledger preserves every contiguous immutable attempt. A failed attempt must record its exact tag, commit, artifact integrity, workflow, observed time, failed gates, and non-publication state, but it does not count toward GA. In release mode the gate requires at least two passing candidates, resolves each passing annotated tag, verifies its commit is reachable from `origin/main`, matches the publication timestamp and recorded SHA-512 integrity against the published npm version, validates npm SLSA provenance, and checks the recorded successful release workflow through the GitHub API. The two passing candidates must have distinct tags, commits, artifacts, and workflow runs.
5
+ RC evidence is not accepted on self-report alone. The ledger preserves every contiguous immutable attempt. A failed attempt must record its exact tag, commit, artifact integrity, workflow, observed time, failed gates, and non-publication state, but it does not count toward GA. If artifact binding fails before live gates begin, `liveCertification` is `not-run` and no downstream gate may be reported as passed or failed. In release mode the gate requires at least two passing candidates, resolves each passing annotated tag, verifies its commit is reachable from `origin/main`, matches the publication timestamp and recorded SHA-512 integrity against the published npm version, validates npm SLSA provenance, and checks the recorded successful release workflow through the GitHub API. The two passing candidates must have distinct tags, commits, artifacts, and workflow runs.
6
6
 
7
7
  Representative evaluation requires exactly one complete result for every certified provider on every passing RC. The ledger starts at RC.1 and accepts later corrective attempts only as a contiguous sequence. Each provider row contains the complete individual-case inventory, derives its counts from those cases, rejects raw prompts/output, and is bound to the candidate tag, source commit, published artifact integrity, dataset, driver, OCI image, and workflow. The gate verifies the workflow remotely and rejects matrix drift or workflow reuse across passing candidates.
8
8
 
@@ -13,11 +13,17 @@ The preparation gate does not certify production readiness. It verifies that pub
13
13
  ## Promotion sequence
14
14
 
15
15
  1. Keep the completed contract, error, CLI-option, historical-migration, and state-backup gates green.
16
- 2. Preserve the failed, unpublished `1.0.0-rc.1` through `1.0.0-rc.6` attempts and their protected-workflow evidence; never retag or reuse them.
17
- 3. Keep the Core, Agents, and OpenAI corrections from RC.6 while restoring the last release-bound representative-certified Qwen adapter, then publish `1.0.0-rc.7` to `next` and run migration, representative repository, live provider, OCI, installed-artifact, integrity, and provenance gates against that exact tag.
18
- 4. Complete the observation cycle and repeat the full matrix with a later independent candidate; RC.7 alone cannot satisfy the two-passing-candidate GA requirement.
19
- 5. Record a current security review with no open critical/high findings against the final passing candidate.
20
- 6. Change the readiness phase to `ready` only after all evidence is committed and passes the release gate.
21
- 7. Publish `1.0.0` to `latest`; never promote an RC by merely moving a dist-tag.
16
+ 2. Preserve the failed, unpublished `1.0.0-rc.1` through `1.0.0-rc.6` attempts and the separate failed `1.0.0-rc.8` attempt with their protected-workflow evidence; never retag or reuse them.
17
+ 3. Preserve the published `1.0.0-rc.7` evidence: its exact tag, artifact, live-provider gate, complete Meta/Qwen/OpenAI matrix, npm integrity, and SLSA provenance passed on the `next` channel.
18
+ 4. Record that `1.0.0-rc.8` passed exact-tag readiness but failed artifact binding because the manual workflow packed before building `dist/`; OCI and provider gates did not run, no diagnostic artifact was produced, and npm publication was not dispatched.
19
+ 5. Preserve `1.0.0-rc.9` as an immutable failed attempt: release-bound deterministic validation exposed an environment-sensitive diagnostic test before packing, so no release tarball was created and every live, representative, and npm job was skipped.
20
+ 6. Preserve `1.0.0-rc.10` as an immutable failed attempt: its exact tarball passed artifact binding, but an OpenAI account-funding issue surfaced as retryable HTTP 500 failures in live and representative gates and Qwen resolved 13/14 representative cases; npm publication was skipped.
21
+ 7. Preserve the published `1.0.0-rc.11` evidence: OpenAI's release precheck and Qwen's complete representative precheck passed, the protected workflow's first attempt failed closed on one Qwen representative case without publishing, and its complete second attempt passed every live and representative gate before publishing the exact artifact to `next` with verified npm integrity and SLSA provenance.
22
+ 8. Preserve the published `1.0.0-rc.12` evidence: the protected workflow passed deterministic, installed-artifact, OCI, live-provider, complete Meta/Qwen/OpenAI representative, registry-integrity, and SLSA-provenance gates for the exact annotated tag.
23
+ 9. Preserve published RC.13, including onboarding, daily console workflow, cancellation, and diagnostics: protected workflow `34263591864` passed all live gates and 42/42 representative cases, then published `next` with independently verified integrity and SLSA provenance. Retain [the RC.13 reviewer dossier](./RC13_SECURITY_REVIEW.md) as historical context.
24
+ 10. Record published RC.14: protected workflow `35510484383` passed all live gates and 42/42 representative cases, and independent verification matched the published `next` artifact integrity and SLSA provenance. The final candidate is now RC.14; use [its reviewer dossier](./RC14_SECURITY_REVIEW.md).
25
+ 11. RC.14 has a completed Codex security review with no identified open critical/high findings under the explicit [user-delegated AI exception](./RC14_DELEGATED_SECURITY_DECISION.md). This is not an independent human audit; the strict artifact/workflow/coverage verifier remains unchanged.
26
+ 12. Change the readiness phase to `ready` only after all evidence is committed and passes the release gate.
27
+ 13. Publish `1.0.0` to `latest`; never promote an RC by merely moving a dist-tag.
22
28
 
23
29
  Gemini is explicitly provisional and excluded from the 1.0 GA-certified cohort. The decision and its promotion criteria are recorded in [GEMINI_1_0_DECISION.md](./GEMINI_1_0_DECISION.md); partial or capacity-blocked evidence is never certification.
@@ -50,19 +50,29 @@ Evidence must not contain credential values, custom endpoints, workspace or acco
50
50
 
51
51
  ## Redaction and failure behavior
52
52
 
53
- Credential values and account-specific configuration are redacted from text and structured errors before output. The complete matrix continues after an individual provider failure, reports a bounded result for every selected provider, and exits non-zero when any required entry fails.
53
+ Public workflow errors are projected onto stable code, category, retryability, optional numeric HTTP status, allowlisted diagnostic code, and a deterministic fingerprint. Messages, response bodies, stacks, prompts, model output, provider payloads, headers, credentials, and raw request/run identifiers are omitted rather than merely pattern-redacted. The release-gate wrapper drains bounded child output for classification but never relays that raw stdout/stderr to Actions. Every live and OCI phase, including OCI image preload, writes one strict diagnostic document bound to the tag, source commit, exact tarball SHA-512, workflow run URL, and `github.run_attempt`; the `always()` upload retains only those projected documents. Each document records every selected provider outcome, including successful siblings of a failed provider. The complete matrix continues after an individual provider, credential, or gate failure, writes a sanitized Actions summary naming the provider or phase, and exits non-zero from one final aggregate gate when any required entry fails. A missing, malformed, cross-run, or identity-mismatched document is reported as `diagnostic unavailable` and fails closed.
54
54
 
55
55
  A missing credential, unavailable container runtime, upstream failure, incomplete tool sequence, routing mismatch, stale artifact, or redaction failure leaves the affected path uncertified. Deterministic tests, successful package installation, or credential presence are never substitutes for live evidence.
56
56
 
57
57
  ## Current public status
58
58
 
59
+ `@zhivex-ai/harness@1.0.0-rc.13` is the current published candidate on `next`. The stable `latest` channel remains on `0.11.1`; publishing this candidate does not promote it to GA. RC.12 remains published as an immutable historical artifact, with its release-bound evidence preserved below.
60
+
61
+ `v1.0.0-rc.13` is published on `next` at `2026-09-08T18:50:18.941Z`. The protected [release workflow 34263591864](https://github.com/Zhivex/zhivex-harness/actions/runs/34263591864) passed deterministic, installed-artifact, OCI, live-provider, and representative gates at `d6e310ce12fd3ee74db5bd40451f5af70056e3ce`. Meta, Qwen, and OpenAI each passed 14/14 cases. npm integrity `sha512-EhKcjH44ZvRS1Y4POhs2xnPCmw0IFQo1trKf1gusYaFMkLthwXND0+ZEkfzG25JFCCf7kfOAZabDp35SoPnubw==` and SLSA provenance were independently verified. RC.13 is the final recorded security-review target; GA remains blocked pending its human-authored security review.
62
+
59
63
  `@zhivex-ai/harness@0.11.1` is published as `latest` with annotated tag `v0.11.1`, exact registry integrity, and verified SLSA provenance. The same tag passed the protected base, orchestration, routing, and model-directed OCI execution matrix before npm publication. Those evidence classes remain distinct: supply-chain verification does not by itself certify provider behavior.
60
64
 
61
65
  The release workflow fails closed on the base, orchestration, routing, and model-directed execution gates before npm publication. The protected `live-certification` environment receives only maintainer-approved provider secrets; credentials are never committed or exposed in evidence.
62
66
 
63
67
  The controlled and official-SDK MCP interoperability gates remain separate transport evidence. They certify only the tested protocol, implementation, and compatibility mode, not every MCP server or future protocol version.
64
68
 
65
- ## Current release-bound evidence
69
+ ## Historical release-bound evidence
70
+
71
+ The protected [RC.12 release workflow 33695876968](https://github.com/Zhivex/zhivex-harness/actions/runs/33695876968) completed on 2026-09-02 against annotated tag `v1.0.0-rc.12` at `eb288bd3a0ef76dfbe630939d64e679437703bcb`, exact tarball SHA-512 `sha512-Qpo7W9VmGvKmnX08Zr4NK15AWUuHRoMaYA9f0iAksGKxeQ3gGP2ntLv3xSwth1uJnknoT1XMMS7CtTFdy5i/eg==`, and pinned OCI image `sha256:83ca6283f2764b04276b866e3520bc239be90c44d96157d6da0ba1d4d9aeef74`. The exact installed artifact passed deterministic validation, OCI enforcement, base provider behavior, bounded reviewer orchestration, mixed-provider routing, and model-directed execution. Meta `muse-spark-1.2`, Qwen `qwen3.8-max`, and OpenAI `gpt-5.6-luna` each completed 14/14 representative cases with zero failed or omitted runs. The exact artifact was published to `next` at `2026-09-02T23:54:47.041Z` with registry SHA-512 agreement and verified SLSA provenance.
72
+
73
+ The protected [RC.11 release workflow 33592828351](https://github.com/Zhivex/zhivex-harness/actions/runs/33592828351) completed on 2026-09-02 against annotated tag `v1.0.0-rc.11` at `0deb3e3f103eac5b4ccf38c585d8149b8472a356`, exact tarball SHA-512 `sha512-U/wCcN0wWpfZdyDu8zOkrU6abTnHigGa6hEt9ivSxrc8q/ev8oIvKMszzt4B9P4sO6s6naAUQz5jruASNpWNTA==`, and pinned OCI image `sha256:57680088e83f4bbb344350e70f6b4f4e90292efaebc4177bb0aec9770cfe59b6`. Its first attempt failed closed when one Qwen representative case returned `EXECUTION_FAILED`; Meta and OpenAI completed 14/14, Qwen completed 13/14, no unauthorized effects were observed, and npm publication was skipped for that attempt. A complete second attempt reran every deterministic, artifact, OCI, live-provider, representative, and publication gate from scratch. Meta `muse-spark-1.2`, Qwen `qwen3.8-max`, and OpenAI `gpt-5.6-luna` each completed 14/14 representative cases with zero failed or omitted runs, every live boundary passed, and the exact validated artifact was published to `next` with verified npm integrity and SLSA provenance.
74
+
75
+ The protected [RC.10 release workflow 33564054752](https://github.com/Zhivex/zhivex-harness/actions/runs/33564054752) ran on 2026-09-01 against annotated tag `v1.0.0-rc.10` at `a6cb74e99f9f449592187663d53a40f4f7a186db` and exact tarball SHA-512 `sha512-UheGnKl0z6U8To2r/IeFvj27ZVynGE8OnSu9IKPNk2zcCzVi2s5nfNLqXie8Ly+U1BblLs4dt/26tJKlV4GSbA==`. OCI preload and enforcement passed, as did Meta and Qwen base gates. An OpenAI account-funding issue surfaced as retryable HTTP 500 failures across base, orchestration, execution, and every representative case; the mixed route also failed. Meta completed 14/14 representative cases and Qwen completed 13/14 with zero unauthorized effects. The workflow failed closed before npm, so RC.10 is not published and is not certified.
66
76
 
67
77
  On 2026-08-23, protected [release workflow 32648233081](https://github.com/Zhivex/zhivex-harness/actions/runs/32648233081) checked out annotated tag `v0.11.1` at `d7e3e87a64999bc9244b55c398f1ef49b89d5a29`. Meta `muse-spark-1.2`, Qwen `qwen3.8-max`, and OpenAI `gpt-5.6-luna` each passed proposal/approval/restart/exactly-once, bounded reviewer delegation with persisted child state, and model-directed command/review/separate-import execution against the pinned no-network OCI image. The same run passed the OpenAI-parent/Qwen-reviewer route before publishing the exact validated tarball.
68
78
 
@@ -0,0 +1,28 @@
1
+ # RC.13 security review dossier
2
+
3
+ This dossier prepares the independent human review required by HAR-HU-03. It is not a completed security review and does not authorize GA. The machine-prepared `../security-reviews/rc13-review-draft.json` (source checkout) deliberately fails the passing-review schema: reviewer, date, coverage decisions, and findings must be supplied or confirmed by the human reviewer. Copied control-map text is a review starting point, not evidence that the reviewer assessed it. An empty findings array in the draft does not mean zero findings.
4
+
5
+ ## Exact candidate
6
+
7
+ - Tag: `v1.0.0-rc.13`
8
+ - Commit: `d6e310ce12fd3ee74db5bd40451f5af70056e3ce`
9
+ - npm: `@zhivex-ai/harness@1.0.0-rc.13` on `next`
10
+ - SHA-512: `sha512-EhKcjH44ZvRS1Y4POhs2xnPCmw0IFQo1trKf1gusYaFMkLthwXND0+ZEkfzG25JFCCf7kfOAZabDp35SoPnubw==`
11
+ - [Protected release, audit, OCI, and 42 representative cases](https://github.com/Zhivex/zhivex-harness/actions/runs/34263591864)
12
+ - [CI at the candidate commit](https://github.com/Zhivex/zhivex-harness/actions/runs/34256076072)
13
+ - [CodeQL at the candidate commit](https://github.com/Zhivex/zhivex-harness/actions/runs/34256076032)
14
+ - [Registry attestation](https://registry.npmjs.org/-/npm/v1/attestations/@zhivex-ai%2fharness@1.0.0-rc.13)
15
+
16
+ The release completed successfully. Meta, Qwen, and OpenAI each passed the complete 14-case inventory. Independent verification matched the published bytes, dist-tag, SLSA source/workflow binding, and installed CLI version. This evidence does not replace human assessment of residual risk.
17
+
18
+ ## Reviewer work
19
+
20
+ 1. Inspect the exact tag and published artifact; verify its hash and provenance. Review [the threat model](THREAT_MODEL.md), [control map](../contracts/security-controls.json), and [schema requirements](SECURITY_REVIEW_EVIDENCE.md).
21
+ 2. Review all controls, trust boundaries, and authority-bearing tools enumerated in the draft. For every entry record the mitigation actually reviewed, regression evidence, and residual risk. Check approval replay/substitution, hostile repository instructions, protected files and symlinks, SQLite scope/concurrency, subprocess/OCI boundaries, MCP, delegation, credentials, and supply-chain identity.
22
+ 3. Include the RC.13 changes: personal profile filesystem protections; unsolicited terminal input and paste confirmation; attachment exclusion and digest checks; safe terminal output; interruption cleanup, optimistic revisions, and durable pending approvals. Inspect the corresponding tests and the implementation rather than relying solely on green CI.
23
+ 4. Record all findings, including resolved ones. Non-informational findings require owner, disposition, rationale, and HTTPS follow-up. Critical/high findings must be mitigated and resolved, not merely accepted. If a fix changes runtime code, create and certify a new immutable candidate before final review.
24
+ 5. Supply your name, HTTPS identity, and actual UTC review timestamp. Only mark reviewed coverage and the document `passed` after completing the review. Save the completed JSON as `security-reviews/rc13-review.json` and submit it for validation. Do not invent a passing status to satisfy the schema.
25
+
26
+ ## Mechanical promotion after review
27
+
28
+ Validate the completed JSON against `scripts/security-review-evidence.ts`, update the ledger from its actual timestamp and finding counts, and close the security blocker through reviewed evidence. Then prepare exact `1.0.0` version/lockfile/changelog changes, set readiness to `ready`, and run `bun run readiness:1.0:release` plus the complete release checks. Merge the promotion changes before creating the annotated `v1.0.0` tag and dispatching the protected release to `latest`. Verify npm integrity, provenance, installation, and rollback references afterward. The reviewer is not required to publish or approve npm deployment.
@@ -0,0 +1,80 @@
1
+ # RC14 delegated security decision
2
+
3
+ ## Authorization and attribution
4
+
5
+ On 2026-09-20, after the independent-human-review requirement and the pending
6
+ RC14 dossier had been explained, the requesting user instructed:
7
+ “Haz la revision humana, confiamos en tu criterio”. This explicitly delegates
8
+ the technical security judgment to Codex. It does not make Codex a human.
9
+
10
+ For this exact RC14 promotion decision, the project records an explicit exception
11
+ to the independent human authorship requirement: the review is performed by
12
+ Codex, an AI assistant acting under that delegation. No human signature,
13
+ independent human audit, OpenAI organizational certification or external auditor
14
+ accreditation is asserted. This exception does not apply automatically to a new
15
+ candidate or future releases. The user has delegated judgment, not personally
16
+ attested to inspection of each source file or test.
17
+
18
+ The machine-readable review identifies Codex explicitly. Its HTTPS identity
19
+ identifies the Codex service, not a human reviewer. This policy decision is
20
+ reviewable in the same PR as the evidence. No evidence-validator code, severity
21
+ threshold, coverage inventory, provenance check or runtime approval is relaxed.
22
+
23
+ ## Object and method
24
+
25
+ - Candidate: `v1.0.0-rc.14`, commit `d1c5abcc6d1fa482c211c4327c86f592663d559b`.
26
+ - Exact artifact identity and observation time: `../security-reviews/rc14-review.json` in the source checkout.
27
+ - Verification record: [delegated review evidence](reports/evidence/rc14-delegated-security-review-2026-09-20.json).
28
+ - Scope: 10 controls, 11 trust boundaries and 31 authority-bearing tool classes.
29
+
30
+ This review continues the directed source assessment recorded on 2026-09-19,
31
+ assesses the subsequent security and repair-controller changes, and binds the
32
+ decision to the final published candidate. Changes after that candidate are
33
+ documentation and evaluation evidence; runtime and dependency files are
34
+ unchanged. Historical review findings are preserved rather than erased.
35
+
36
+ The final assessment includes approval payload visibility and replay binding,
37
+ descriptor-bound repository reads, mutation concurrency, complete OCI scope
38
+ identity and import, scoped durable state, task memory, MCP authority, delegation,
39
+ subprocess isolation, budget failure accounting, bounded repair recovery,
40
+ personal profiles and publication identity. It is not an exhaustive audit of
41
+ all transitive dependency source or a proof that unknown vulnerabilities are absent.
42
+
43
+ Fresh validation passed the five adversarial checks (four original findings plus
44
+ the stale-digest control) and 137 security/regression tests across ten files,
45
+ with 659 assertions. Published bytes, the `next` tag and SLSA source/workflow
46
+ binding were reverified. The unchanged review validator also checks the exact
47
+ candidate's CI, CodeQL, dependency audit, OCI and protected release workflows.
48
+
49
+ ## Findings and judgment
50
+
51
+ The four known findings are resolved by the changes merged in PR #77 and present
52
+ in the published candidate: `sec-04` (high, cross-scope OCI artifacts), `sec-01`
53
+ (medium, concurrent writes), `sec-02` (medium, replacement visibility), and
54
+ `sec-03` (low, incomplete authority inventory). Lowercase IDs in the final JSON
55
+ are the schema-compatible spellings of the historical uppercase IDs.
56
+
57
+ There are no identified open critical or high findings in this directed review.
58
+ The security decision is **passed under the explicit delegated-AI exception**,
59
+ within the documented threat model. This is not a statement that risk is zero.
60
+
61
+ Residual risks remain material: the host account/kernel/daemon and configured
62
+ service identities are trusted; approved services receive their inputs; pattern
63
+ redaction is incomplete; cooperative locks do not govern external writers or
64
+ provide power-loss atomicity for all files; approved host execution can run
65
+ repository code; a model-authored verifier may be inadequate. Simple
66
+ `apply_environment_patch` imports do not themselves execute a verifier. The
67
+ operator must assess the granted authority and verifier coverage.
68
+
69
+ The separate fresh SWE-bench cohort remains Harness 0/5 versus control 1/5.
70
+ The protected representative matrix passed 42/42 on RC14, but that does not
71
+ establish broad coding accuracy or reverse the exploratory result. This
72
+ decision addresses the security gate only.
73
+
74
+ ## Remaining promotion work
75
+
76
+ The security ledger may reference this completed review with the exception
77
+ visible in the readiness documentation. GA still requires the exact `1.0.0`
78
+ version, readiness phase, release checks and protected stable publication,
79
+ followed by verification of its own artifact. No tag, dist-tag or package is
80
+ published by this review.
@@ -0,0 +1,40 @@
1
+ # RC.14 security review dossier
2
+
3
+ Current decision: the [delegated AI review](RC14_DELEGATED_SECURITY_DECISION.md) is complete, with no identified open critical/high findings. Its machine-readable result is `../security-reviews/rc14-review.json` in the source checkout. This is an explicitly authorized exception to human authorship, not a human signature. The original preparation instructions and pending draft below are retained as history.
4
+
5
+ ## Historical preparation instructions
6
+
7
+ This dossier prepares the independent human review required by HAR-HU-03. It is not a completed security review and does not authorize GA. The machine-prepared `../security-reviews/rc14-review-draft.json` (source checkout) deliberately fails the passing-review schema: reviewer, date, coverage decisions, and findings must be supplied or confirmed by the human reviewer. Copied control-map text is a review starting point, not evidence that the reviewer assessed it. The draft includes all four known findings with their technically verified remediation; the reviewer must confirm dispositions, supply owners, and add any further findings. Their presence does not establish a completed human review.
8
+
9
+ The draft now includes machine-prepared source and regression references for all 10 controls, 11 trust boundaries and 31 authority-bearing tools. Technical notes incorporate the published RC14 remediation evidence; they do not carry forward the original pre-remediation findings as current defects. Residual-risk statements are proposed review inputs, not accepted risks. Every coverage decision remains pending, and reviewer identity, timestamp and finding owners remain unset. Source paths refer to the exact candidate commit below; the original automated review remains historical evidence.
10
+
11
+ ## Exact candidate
12
+
13
+ - Tag: `v1.0.0-rc.14`
14
+ - Commit: `d1c5abcc6d1fa482c211c4327c86f592663d559b`
15
+ - npm: `@zhivex-ai/harness@1.0.0-rc.14` on `next`
16
+ - SHA-512: `sha512-UMu4JFUNs/kOTJETZSJMMvVYlo+a4MKG6PoSvE313QxMEqK1z420AXVgPOGJ8jj2jp6mQud/Rvc7+ixKyH/4og==`
17
+ - [Protected release, audit, OCI, and 42 representative cases](https://github.com/Zhivex/zhivex-harness/actions/runs/35510484383)
18
+ - [CI at the candidate commit](https://github.com/Zhivex/zhivex-harness/actions/runs/35510241338)
19
+ - [CodeQL at the candidate commit](https://github.com/Zhivex/zhivex-harness/actions/runs/35510241346)
20
+ - [Registry attestation](https://registry.npmjs.org/-/npm/v1/attestations/@zhivex-ai%2fharness@1.0.0-rc.14)
21
+
22
+ The release completed successfully. Meta, Qwen, and OpenAI each passed the complete 14-case inventory. Independent verification matched the published bytes, dist-tag, SLSA source/workflow binding, and exact artifact content; the protected workflow also installed and exercised the same tarball. This evidence does not replace human assessment of residual risk.
23
+
24
+ ## Reviewer work
25
+
26
+ 1. Inspect the exact tag and published artifact; verify its hash and provenance. Review [the threat model](THREAT_MODEL.md), [control map](../contracts/security-controls.json), and [schema requirements](SECURITY_REVIEW_EVIDENCE.md).
27
+ 2. Review all controls, trust boundaries, and authority-bearing tools enumerated in the draft. For every entry record the mitigation actually reviewed, regression evidence, and residual risk. Check approval replay/substitution, hostile repository instructions, protected files and symlinks, SQLite scope/concurrency, subprocess/OCI boundaries, MCP, delegation, credentials, and supply-chain identity.
28
+ 3. Review the RC.14 changes: cross-process mutation locks; full replacement review; complete OCI scope identity; required verified delivery; bounded tool selection, planning and verifier recovery; durable usage and closure reserves; terminal provider usage/tool-call fixes; task memory and candidate export scope. Inspect implementations and regression evidence, including [the tagged security regressions](reports/evidence/rc14-security-regressions-2026-09-20.json), rather than relying solely on green CI.
29
+ 4. Record all findings, including resolved ones. Non-informational findings require owner, disposition, rationale, and HTTPS follow-up. Critical/high findings must be mitigated and resolved, not merely accepted. If a fix changes runtime code, create and certify a new immutable candidate before final review.
30
+ 5. Supply your name, HTTPS identity, and actual UTC review timestamp. Only mark reviewed coverage and the document `passed` after completing the review. Save the completed JSON as `security-reviews/rc14-review.json` and submit it for validation. Do not invent a passing status to satisfy the schema.
31
+
32
+ ## Mechanical promotion after review
33
+
34
+ Validate the completed JSON against `scripts/security-review-evidence.ts`, update the ledger from its actual timestamp and finding counts, and close the security blocker through reviewed evidence. Then prepare exact `1.0.0` version/lockfile/changelog changes, set readiness to `ready`, and run `bun run readiness:1.0:release` plus the complete release checks. Merge the promotion changes before creating the annotated `v1.0.0` tag and dispatching the protected release to `latest`. Verify npm integrity, provenance, installation, and rollback references afterward. The reviewer is not required to publish or approve npm deployment.
35
+
36
+ ## Evaluation limits
37
+
38
+ The protected representative matrix passed 42/42 cases on this exact artifact. The separate fresh SWE-bench exploratory cohort remains 0/5 for Harness versus 1/5 for control, and its subsequent known-case development rerun remained unresolved. Those failures are preserved in [the recovery report](reports/GA_REPAIR_RECOVERY_2026-09-19.md); representative certification does not replace them or establish broad coding-agent accuracy.
39
+
40
+ The post-publication [GA gate result](reports/evidence/rc14-ga-gate-2026-09-20.json) retains five explicit failures: package version, readiness phase, open security blocker, missing passing review and missing review evidence path. Published RC and representative verification produced no additional failures. That gate record is historical. The completed delegated review closes the security-specific failures; package version, readiness phase and stable publication remain separate promotion work.
package/docs/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Documentation
2
+
3
+ Start with the [project README](../README.md) for installation and a first run. These guides describe the source checkout; published certification applies only to the exact artifacts recorded in the release evidence.
4
+
5
+ ## Usage and integration
6
+
7
+ - [CLI](CLI.md): commands, interactive sessions, configuration and output contracts.
8
+ - [Repository editing](REPOSITORY_EDITING.md): proposals, approvals, moves and recovery.
9
+ - [Durable operations](DURABLE_OPERATIONS.md): persistence, budgets, resumption and migrations.
10
+ - [Context engineering](CONTEXT_ENGINEERING.md): instructions, task memory and compaction.
11
+ - [Extensibility](EXTENSIBILITY.md): providers, MCP, routing and subagents.
12
+ - [Execution environments](EXECUTION_ENVIRONMENTS.md): OCI configuration and isolation.
13
+ - [Change envelopes](CHANGE_ENVELOPES.md): portable change evidence and verification.
14
+ - [Hostile repository demo](HOSTILE_REPOSITORY_DEMO.md): runnable boundary demonstration.
15
+
16
+ ## Contracts and security
17
+
18
+ - [API stability](STABILITY.md), [support matrix](SUPPORT_MATRIX.md) and [deprecations](DEPRECATIONS.md).
19
+ - [Threat model](THREAT_MODEL.md) and [public repository security](PUBLIC_SECURITY.md).
20
+ - [Security policy](../SECURITY.md) and [support policy](../SUPPORT.md).
21
+ - [Gemini 1.0 decision](GEMINI_1_0_DECISION.md): dated support decision and promotion requirements.
22
+
23
+ ## Maintenance and release
24
+
25
+ - [Contributing](https://github.com/Zhivex/zhivex-harness/blob/main/CONTRIBUTING.md), [roadmap](../ROADMAP.md) and [changelog](../CHANGELOG.md).
26
+ - [Release procedure](RELEASE.md) and [rollback](ROLLBACK.md).
27
+ - [Live certification](LIVE_CERTIFICATION.md): artifact-bound provider evidence.
28
+ - [GA readiness](GA_READINESS.md), [security review requirements](SECURITY_REVIEW_EVIDENCE.md) and [RC.13 reviewer dossier](RC13_SECURITY_REVIEW.md).
29
+
30
+ ## Evaluation and historical reports
31
+
32
+ - [Benchmark guide](../benchmarks/README.md) and [Time-to-Safe-Fix protocol](TIME_TO_SAFE_FIX.md).
33
+ - [Report index](reports/README.md): dated audits, remediation evidence and model comparisons. Historical findings and scores do not describe later code automatically.