harness-everything 0.16.3 → 0.16.4

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.
@@ -10,7 +10,7 @@
10
10
  "name": "harness-everything",
11
11
  "source": "./",
12
12
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
13
- "version": "0.16.3",
13
+ "version": "0.16.4",
14
14
  "author": {
15
15
  "name": "Miya Daniel"
16
16
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-everything",
3
3
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
4
- "version": "0.16.3",
4
+ "version": "0.16.4",
5
5
  "author": {
6
6
  "name": "Miya Daniel"
7
7
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.16.4](https://github.com/dyphn1/Harness-everything/compare/v0.16.3...v0.16.4) (2026-09-20)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **repo:** close issues 205-207 ([423ff63](https://github.com/dyphn1/Harness-everything/commit/423ff638f08cdaa14d4ab0856bfe2d2bc6b050db)), closes [#205](https://github.com/dyphn1/Harness-everything/issues/205) [#206](https://github.com/dyphn1/Harness-everything/issues/206) [#205](https://github.com/dyphn1/Harness-everything/issues/205) [#206](https://github.com/dyphn1/Harness-everything/issues/206) [#207](https://github.com/dyphn1/Harness-everything/issues/207)
10
+
5
11
  ## [0.16.3](https://github.com/dyphn1/Harness-everything/compare/v0.16.2...v0.16.3) (2026-09-20)
6
12
 
7
13
  ### Bug Fixes
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs');
5
+ const os = require('os');
6
+ const path = require('path');
7
+ const { spawnSync } = require('child_process');
8
+
9
+ const ROOT = path.resolve(__dirname, '..');
10
+ let failed = 0;
11
+
12
+ function check(condition, message) {
13
+ if (condition) {
14
+ console.log(`PASS ${message}`);
15
+ } else {
16
+ failed += 1;
17
+ console.error(`FAIL ${message}`);
18
+ }
19
+ }
20
+
21
+ const dockerVerify = fs.readFileSync(path.join(ROOT, 'docker-verify.sh'), 'utf8');
22
+ const legacyStatePath = '.claude/harness-everything/state/sessions/default';
23
+ check(/STATE_DIR=\$\(node -e[\s\S]*getSessionDir\(null, 'default'\)/.test(dockerVerify),
24
+ '#205 docker verifier resolves one canonical session state directory');
25
+ check(!dockerVerify.includes(legacyStatePath),
26
+ '#205 docker verifier does not seed or read the legacy repo-relative state directory');
27
+ check((dockerVerify.match(/\$STATE_DIR\//g) || []).length >= 10,
28
+ '#205 docker verifier routes all state checks through STATE_DIR');
29
+
30
+ const architecture = fs.readFileSync(path.join(ROOT, 'docs/architecture.md'), 'utf8');
31
+ check(architecture.includes('advisory loop-awareness reminders'),
32
+ '#206 architecture names loop-awareness as advisory');
33
+ check(!/\bloop budgets\b/.test(architecture),
34
+ '#206 architecture does not describe retired loop budgets as enforcement');
35
+
36
+ const commitlintConfig = require(path.join(ROOT, 'commitlint.config.js'));
37
+ check(JSON.stringify(commitlintConfig.rules['subject-case']) === JSON.stringify([2, 'always', 'lower-case']),
38
+ '#207 commitlint aligns subject-case with repository Conventional Commit history');
39
+
40
+ const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'harness-issue-207-'));
41
+ const messageFile = path.join(tempDir, 'commit-message.txt');
42
+ fs.writeFileSync(messageFile, 'fix(runtime): align post-190 advisory contracts\n', 'utf8');
43
+ const commitlintPackage = require.resolve('@commitlint/cli/package.json');
44
+ const commitlintMeta = JSON.parse(fs.readFileSync(commitlintPackage, 'utf8'));
45
+ const commitlintBin = typeof commitlintMeta.bin === 'string'
46
+ ? commitlintMeta.bin
47
+ : commitlintMeta.bin.commitlint;
48
+ const commitlintCli = path.resolve(path.dirname(commitlintPackage), commitlintBin);
49
+ const result = spawnSync(process.execPath, [commitlintCli, '--edit', messageFile], {
50
+ cwd: ROOT,
51
+ encoding: 'utf8',
52
+ });
53
+ check(result.status === 0,
54
+ '#207 representative lowercase repository subject passes commitlint');
55
+
56
+ fs.rmSync(tempDir, { recursive: true, force: true });
57
+
58
+ console.log(`\n${failed === 0 ? 'PASS' : 'FAIL'}: issues #205-#207 regression mechanism (${failed} failure${failed === 1 ? '' : 's'})`);
59
+ process.exit(failed === 0 ? 0 : 1);
@@ -18,8 +18,8 @@ module.exports = {
18
18
  'build'
19
19
  ]
20
20
  ],
21
- 'subject-case': [2, 'always', 'sentence-case'],
21
+ 'subject-case': [2, 'always', 'lower-case'],
22
22
  'subject-empty': [2, 'never'],
23
23
  'header-max-length': [2, 'always', 100]
24
24
  }
25
- };
25
+ };
package/docker-verify.sh CHANGED
@@ -26,13 +26,12 @@ npm test
26
26
  echo -e "\n[Step 3] Running Mechanism Checks..."
27
27
 
28
28
  # 3a. Rule of 3 Circuit Breaker actually blocks
29
- # Runtime state lives under .claude/harness-everything/state/sessions/<session_id>/;
30
- # invocations with no session_id (like these bare/manual calls) fall into a
31
- # fixed sessions/default/ bucket.
29
+ # Runtime state is resolved once through the same workspace-keyed helper used by
30
+ # the hooks. Invocations with no session_id use the fixed default session.
31
+ STATE_DIR=$(node -e "process.stdout.write(require('./hooks/scripts/lib/harness-state').getSessionDir(null, 'default'))")
32
32
  echo -e "\n---> Running 3a: Rule of 3 Circuit Breaker"
33
- mkdir -p .claude/harness-everything/state/sessions/default
34
- rm -f .claude/harness-everything/state/sessions/default/zoom-out-report.md
35
- echo '{"count":3,"lastHash":"verify-test","zoomOutResolved":false}' > .claude/harness-everything/state/sessions/default/rule-of-3-state.json
33
+ rm -f "$STATE_DIR/zoom-out-report.md"
34
+ echo '{"count":3,"lastHash":"verify-test","zoomOutResolved":false}' > "$STATE_DIR/rule-of-3-state.json"
36
35
 
37
36
  # We expect this to exit with 2 and print CRITICAL trigger message
38
37
  set +e
@@ -68,8 +67,8 @@ echo "✅ PASS: Rule of 3 reset check passed."
68
67
 
69
68
  # 3a-bis. Zoom-out reflection report releases the breaker (self-recovery path)
70
69
  echo -e "\n---> Running 3a-bis: Zoom-out report releases the breaker"
71
- echo '{"count":3,"lastHash":"verify-test","zoomOutResolved":false,"lastFailureAt":0,"zoomOutCycles":0}' > .claude/harness-everything/state/sessions/default/rule-of-3-state.json
72
- printf '## Goal\nx\n## Failed Attempts\nx\n## Verified Facts\nx\n## Diagnosis\nx\n## Decision\nRESUME: new approach\n' > .claude/harness-everything/state/sessions/default/zoom-out-report.md
70
+ echo '{"count":3,"lastHash":"verify-test","zoomOutResolved":false,"lastFailureAt":0,"zoomOutCycles":0}' > "$STATE_DIR/rule-of-3-state.json"
71
+ printf '## Goal\nx\n## Failed Attempts\nx\n## Verified Facts\nx\n## Diagnosis\nx\n## Decision\nRESUME: new approach\n' > "$STATE_DIR/zoom-out-report.md"
73
72
 
74
73
  set +e
75
74
  node hooks/scripts/rule-of-3.js
@@ -79,9 +78,9 @@ if [ "$EXIT_CODE" -ne 0 ]; then
79
78
  echo "❌ FAIL: Valid reflection report did not release the breaker (expected 0, got $EXIT_CODE)"
80
79
  exit 1
81
80
  fi
82
- if ! node -e "const s=require('./.claude/harness-everything/state/sessions/default/rule-of-3-state.json'); process.exit(s.count===0 && s.zoomOutResolved===true && s.zoomOutCycles===1 ? 0 : 1)"; then
81
+ if ! node -e "const s=require(process.argv[1]); process.exit(s.count===0 && s.zoomOutResolved===true && s.zoomOutCycles===1 ? 0 : 1)" "$STATE_DIR/rule-of-3-state.json"; then
83
82
  echo "❌ FAIL: Breaker state not updated after report release"
84
- cat .claude/harness-everything/state/sessions/default/rule-of-3-state.json
83
+ cat "$STATE_DIR/rule-of-3-state.json"
85
84
  exit 1
86
85
  fi
87
86
  echo "✅ PASS: Valid reflection report released the breaker (self-recovery)."
@@ -91,11 +90,8 @@ echo "✅ PASS: Valid reflection report released the breaker (self-recovery)."
91
90
  # the contract is exit 2 plus the reflection-required message the hook actually
92
91
  # prints - never a permanent lock (ci/mechanism-2a-rule-of-3.test.js:58-64).
93
92
  echo -e "\n---> Running 3a-ter: Re-trip requests another zoom-out"
94
- # Seed through the hooks' own resolver: since #42 runtime state lives in the
95
- # global, workspace-keyed state root ($HARNESS_STATE_HOME or
96
- # ~/.agents/harness-everything/...), and a repo-relative seed only reaches the
97
- # hook while the one-time legacy migration can still move it.
98
- STATE_DIR=$(node -e "process.stdout.write(require('./hooks/scripts/lib/harness-state').getSessionDir(null, 'default'))")
93
+ # Seed through the hooks' own resolver in the already resolved workspace-keyed
94
+ # state root.
99
95
  RETRIP_AT=$(node -e "process.stdout.write(String(Date.now()))")
100
96
  node -e "require('fs').writeFileSync(process.argv[1], JSON.stringify({count:3,lastHash:'verify-test',zoomOutResolved:false,lastFailureAt:Number(process.argv[2]),zoomOutCycles:1}))" "$STATE_DIR/rule-of-3-state.json" "$RETRIP_AT"
101
97
  set +e
@@ -173,17 +169,17 @@ echo "✅ PASS: Boundary Guard blocked large read successfully."
173
169
 
174
170
  # 3c. State persistence (WAL) records failure and handles clear
175
171
  echo -e "\n---> Running 3c: State persistence (WAL)"
176
- rm -f .claude/harness-everything/state/sessions/default/handoff-state.json
172
+ rm -f "$STATE_DIR/handoff-state.json"
177
173
 
178
174
  # Record failure
179
175
  echo '{"tool_name":"Bash","tool_response":{"stdout":"","stderr":"npm ERR! verify-test failure"}}' | node hooks/scripts/state-persist.js
180
176
 
181
- if [ ! -f ".claude/harness-everything/state/sessions/default/handoff-state.json" ]; then
177
+ if [ ! -f "$STATE_DIR/handoff-state.json" ]; then
182
178
  echo "❌ FAIL: handoff-state.json was not created"
183
179
  exit 1
184
180
  fi
185
181
 
186
- STATUS=$(node -e "console.log(JSON.parse(require('fs').readFileSync('.claude/harness-everything/state/sessions/default/handoff-state.json','utf8')).status)")
182
+ STATUS=$(node -e "console.log(JSON.parse(require('fs').readFileSync(process.argv[1],'utf8')).status)" "$STATE_DIR/handoff-state.json")
187
183
  if [ "$STATUS" != "failed" ]; then
188
184
  echo "❌ FAIL: Expected status to be 'failed', got '$STATUS'"
189
185
  exit 1
@@ -254,8 +250,8 @@ echo "✅ PASS: Subagent scope guard successfully blocked out-of-scope modificat
254
250
 
255
251
  # 3f. Stop gate bounces an unverified-edit stop exactly once
256
252
  echo -e "\n---> Running 3f: Stop Gate"
257
- rm -f .claude/harness-everything/state/sessions/default/stop-gate-state.json
258
- node -e "require('fs').mkdirSync('.claude/harness-everything/state/sessions/default',{recursive:true}); require('fs').writeFileSync('.claude/harness-everything/state/sessions/default/handoff-state.json', JSON.stringify({status:'idle',lastEditAt:Date.now(),lastVerifyAt:0}))"
253
+ rm -f "$STATE_DIR/stop-gate-state.json"
254
+ node -e "require('fs').writeFileSync(process.argv[1], JSON.stringify({status:'idle',lastEditAt:Date.now(),lastVerifyAt:0}))" "$STATE_DIR/handoff-state.json"
259
255
  echo "dirty" > .verify-dirty.tmp
260
256
 
261
257
  set +e
@@ -285,7 +281,7 @@ if [ "$EXIT_CODE" -ne 0 ]; then
285
281
  fi
286
282
 
287
283
  # Loop guard: stop_hook_active always passes
288
- rm -f .claude/harness-everything/state/sessions/default/stop-gate-state.json
284
+ rm -f "$STATE_DIR/stop-gate-state.json"
289
285
  set +e
290
286
  echo '{"stop_hook_active":true}' | node hooks/scripts/stop-gate.js
291
287
  EXIT_CODE=$?
@@ -294,7 +290,7 @@ if [ "$EXIT_CODE" -ne 0 ]; then
294
290
  echo "❌ FAIL: Stop gate blocked despite stop_hook_active (expected 0, got $EXIT_CODE)"
295
291
  exit 1
296
292
  fi
297
- rm -f .verify-dirty.tmp .claude/harness-everything/state/sessions/default/handoff-state.json .claude/harness-everything/state/sessions/default/stop-gate-state.json
293
+ rm -f .verify-dirty.tmp "$STATE_DIR/handoff-state.json" "$STATE_DIR/stop-gate-state.json"
298
294
  echo "✅ PASS: Stop gate bounced once, then respected the batch and loop guards."
299
295
 
300
296
  # Clean up temporary test output logs
@@ -71,7 +71,7 @@ For selected Fable topologies on Claude:
71
71
  - `workflow-stop-gate.js` reports unresolved stage/verification evidence without rejecting Stop;
72
72
  - `workflow-disposition.js` records explicit lifecycle/audit decisions; numeric budgets are no longer authoritative control state.
73
73
 
74
- Other topologies use their own applicable mechanisms: loop budgets, regular verification stop-gates, action gates, and task-specific skills. Mechanism coverage is not assumed identical across hosts.
74
+ Other topologies use their own applicable mechanisms: advisory loop-awareness reminders, regular verification stop-gates, action gates, and task-specific skills. Mechanism coverage is not assumed identical across hosts.
75
75
 
76
76
  ### Scoped runtime advisories and capabilities
77
77
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-enforcement",
3
3
  "description": "Repository inventory for the opencode enforcement plugin and its standalone helper",
4
- "version": "0.16.3",
4
+ "version": "0.16.4",
5
5
  "runtime": "index.mjs",
6
6
  "hooks": {
7
7
  "verify": "hooks/verify.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.16.3",
3
+ "version": "0.16.4",
4
4
  "description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
5
5
  "main": "harness-everything/scripts/bootstrap.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.16.3",
3
+ "version": "0.16.4",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "harness-everything",
4
- "version": "0.16.3",
4
+ "version": "0.16.4",
5
5
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
6
6
  "author": {
7
7
  "name": "Miya Daniel",