persona-harness 0.8.23 → 0.8.24

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.
package/README.md CHANGED
@@ -149,7 +149,7 @@ address hostile same-user filesystem path replacement.
149
149
  > [!IMPORTANT]
150
150
  > `workflow finish` cannot reach a trusted PASS from a purely local checkout. Clearing every content gate still leaves `trusted-authority-required`, because only a verified external attestation from an enrolled repository grants finish authority. Enrol one with `npx ph authority`, and run `npx ph doctor` to see the current `Finish authority` and `Consumer authority` state before you rely on the gate.
151
151
 
152
- Three-beat setup, gate, and goal-entry walkthrough: **[Quick Demo](docs/QUICK-DEMO.md)**.
152
+ Three-beat setup, gate, and goal-entry walkthrough: **[Quick Demo](docs/QUICK-DEMO.md)**. Repository maintainers and reviewers can run the separate exact-package Gradle/JUnit contract: **[Full cooperative verification demo](docs/QUICK-DEMO.md#full-cooperative-verification-demo)**.
153
153
 
154
154
  ## TDD Rail (opt-in)
155
155
 
@@ -71,6 +71,28 @@ npx ph workflow closure next --json
71
71
  `workflow closure next --json` is diagnostic state, not a `finish --json`
72
72
  result. `workflow finish` has no `--json` option.
73
73
 
74
+ ## Full Cooperative Verification Demo
75
+
76
+ Repository maintainers and reviewers can exercise the longer exact-package
77
+ contract from a Persona Harness checkout:
78
+
79
+ ```bash
80
+ npm ci
81
+ node scripts/verify-cooperative-finish-demo.mjs
82
+ ```
83
+
84
+ It requires Node 20.19+, JDK 21, and Gradle 9.4.0. The required repository
85
+ verification job runs this exact command. It creates a disposable Java/Spring
86
+ Gradle fixture, packs and installs the current package tarball, demonstrates
87
+ the initial `workflow-state-uninitialized` block, then records real
88
+ Gradle/JUnit evidence and reaches `Finish status: PASS` with
89
+ `--assurance cooperative`.
90
+
91
+ This is a maintainer/reviewer test contract, not an end-user startup command.
92
+ It keeps runtime injection default-off, does not call an external authority,
93
+ and does not grant trusted external authority. Add `-- --keep` only when the
94
+ temporary fixture needs manual inspection.
95
+
74
96
  ## Boundaries
75
97
 
76
98
  This walkthrough demonstrates only the observed setup, blocked-finish, and
@@ -122,9 +122,18 @@ npm run demo:java-mvp
122
122
 
123
123
  `npm run demo:init`은 package artifact가 실제 설치 환경에서 `persona-harness init`으로 clean project를 안전하게 초기화하는지 확인한다.
124
124
 
125
- `npm run demo:bootstrap`은 init 이후 README target에서 bootstrap injection과 runtime evidence 생성이 되는지 확인한다.
125
+ `npm run demo:bootstrap`은 init 이후 README target에서 bootstrap injection과 runtime evidence 생성이 되는지 확인한다. 설치된 named `PersonaHarnessPlugin` export를 사용하고 임시 프로젝트 안에서만 `ph bootstrap backend --runtime-injection-preview --no-developer-mcp`를 명시적으로 적용한다. 이 opt-in은 기본 `runtimeInjection` 설정을 바꾸지 않는다.
126
126
 
127
- `npm run demo:java-mvp`는 package artifact가 실제 설치 환경에서도 Java Controller plugin hook, injection, model input transform, evidence 생성 경로를 재현하는지 확인한다.
127
+ `npm run demo:java-mvp`는 package artifact가 실제 설치 환경에서도 Java Controller plugin hook, injection, model input transform, evidence 생성 경로를 재현하는지 확인한다. 마찬가지로 disposable fixture에서만 preview opt-in을 사용한다.
128
+
129
+ 저장소 maintainer/reviewer가 실제 Gradle/JUnit과 workflow Finish 경계를 검증하려면 Node 20.19+, JDK 21, Gradle 9.4.0 환경에서 다음을 실행한다.
130
+
131
+ ```bash
132
+ npm ci
133
+ node scripts/verify-cooperative-finish-demo.mjs
134
+ ```
135
+
136
+ 이 명령은 exact packed package를 disposable Java/Spring fixture에 설치하고, 먼저 `workflow-state-uninitialized` BLOCK을 확인한 다음 실제 Gradle/JUnit evidence와 `--assurance cooperative`의 `Finish status: PASS`를 확인한다. required repository CI도 같은 명령을 실행한다. 이는 trusted external authority나 production quality를 증명하지 않는다.
128
137
 
129
138
  검증하는 것:
130
139
 
@@ -212,7 +221,7 @@ Plugin hook이 발동하면 연결한 Java/Spring 프로젝트의 configured evi
212
221
 
213
222
  ## Non-Goals
214
223
 
215
- 이 install guide와 `npm run demo:java-mvp`는 다음을 보증하지 않는다.
224
+ 이 install guide와 `npm run demo:java-mvp` 및 `node scripts/verify-cooperative-finish-demo.mjs`는 다음을 보증하지 않는다.
216
225
 
217
226
  - 생성된 Spring application의 품질
218
227
  - 테스트 충분성
@@ -302,9 +302,18 @@ npm run demo:java-mvp
302
302
 
303
303
  `npm run demo:init`은 package artifact를 임시 clean project에 설치하고 `persona-harness init`을 실행해 `.persona/rules`, `.persona/harness.jsonc`, `.opencode/opencode.json`이 안전하게 만들어지는지 확인한다. 이때 `.persona/evidence`가 생기면 실패한다.
304
304
 
305
- `npm run demo:bootstrap`은 init 이후 `README.md` target으로 설치된 plugin hook을 직접 호출해 `project-bootstrap` injection과 runtime evidence 생성을 확인한다.
305
+ `npm run demo:bootstrap`은 init 이후 `README.md` target으로 설치된 named `PersonaHarnessPlugin` hook을 직접 호출해 `project-bootstrap` injection과 runtime evidence 생성을 확인한다. disposable fixture에서만 `ph bootstrap backend --runtime-injection-preview --no-developer-mcp`를 명시적으로 적용하며, 기본 `runtimeInjection`은 그대로 off다.
306
306
 
307
- `npm run demo:java-mvp`는 package artifact가 실제 설치 환경에서도 plugin hook, injection, model input transform, evidence 생성 경로를 재현하는지 확인한다. 내부적으로 빌드, `npm pack`, 임시 프로젝트 설치, `persona-harness init`, 설치된 `dist/index.js` OpenCode plugin hook 실행, Java Controller injection, model input transform, `.persona/evidence/phase0` evidence 생성을 검증한다.
307
+ `npm run demo:java-mvp`는 package artifact가 실제 설치 환경에서도 plugin hook, injection, model input transform, evidence 생성 경로를 재현하는지 확인한다. 내부적으로 빌드, `npm pack`, 임시 프로젝트 설치, `persona-harness init`, 설치된 `dist/index.js` OpenCode plugin hook 실행, Java Controller injection, model input transform, `.persona/evidence/phase0` evidence 생성을 검증한다. 이 preview opt-in도 disposable fixture 안에 한정된다.
308
+
309
+ 실제 Gradle/JUnit과 workflow Finish의 BLOCK-to-PASS 경계는 repository maintainer/reviewer용 별도 명령이다. Node 20.19+, JDK 21, Gradle 9.4.0 환경에서 실행한다.
310
+
311
+ ```bash
312
+ npm ci
313
+ node scripts/verify-cooperative-finish-demo.mjs
314
+ ```
315
+
316
+ 이 명령은 exact packed package를 Java/Spring fixture에 설치하고 `workflow-state-uninitialized` BLOCK을 먼저 확인한 뒤, 실제 Gradle/JUnit evidence와 `--assurance cooperative`의 local `Finish status: PASS`를 검증한다. required repository CI도 같은 명령을 실행하며 trusted external authority나 생성된 application quality는 주장하지 않는다.
308
317
 
309
318
  ### B. Clean Java/Spring Project Local Install
310
319
 
@@ -559,6 +568,7 @@ npm run build
559
568
  npm run demo:init
560
569
  npm run demo:bootstrap
561
570
  npm run demo:java-mvp
571
+ node scripts/verify-cooperative-finish-demo.mjs
562
572
  npm test
563
573
  npm run typecheck
564
574
  npm run build
@@ -588,7 +598,15 @@ npm run demo:bootstrap
588
598
  npm run demo:java-mvp
589
599
  ```
590
600
 
591
- 이 명령들은 현재 저장소를 빌드한 뒤 `npm pack`으로 tarball을 만들고, 임시 프로젝트에 `persona-harness` 패키지를 설치한다. `demo:init`은 `persona-harness init` 표면을 검증하고, `demo:bootstrap`은 README bootstrap hook surface를 검증하며, `demo:java-mvp`는 Java Controller target에 대한 Phase 0 hook을 직접 호출한다.
601
+ 이 명령들은 현재 저장소를 빌드한 뒤 `npm pack`으로 tarball을 만들고, 임시 프로젝트에 `persona-harness` 패키지를 설치한다. `demo:init`은 `persona-harness init` 표면을 검증하고, `demo:bootstrap`은 disposable preview opt-in으로 README bootstrap hook surface를 검증하며, `demo:java-mvp`는 같은 disposable preview opt-in으로 Java Controller target에 대한 Phase 0 hook을 직접 호출한다.
602
+
603
+ Node 20.19+, JDK 21, Gradle 9.4.0이 있는 repository maintainer/reviewer는 다음 full contract도 실행할 수 있다.
604
+
605
+ ```bash
606
+ node scripts/verify-cooperative-finish-demo.mjs
607
+ ```
608
+
609
+ 이 명령은 initial `workflow-state-uninitialized` BLOCK, exact packed package, 실제 Gradle/JUnit evidence, `--assurance cooperative` local PASS를 검증한다. trusted external authority나 application quality를 증명하지 않으며 required repository CI가 동일 명령을 실행한다.
592
610
 
593
611
  검증하는 것:
594
612