@junghanacs/entwurf 0.19.0 → 0.20.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 (59) hide show
  1. package/AGENTS.md +1 -1
  2. package/BASELINE.md +23 -5
  3. package/CHANGELOG.md +236 -0
  4. package/DELIVERY.md +59 -6
  5. package/README.md +40 -9
  6. package/VERIFY.md +9 -1
  7. package/docs/acp-backend-rail.md +9 -1
  8. package/docs/external-mcp-host.md +6 -3
  9. package/docs/setup-clean-host.md +93 -7
  10. package/mcp/entwurf-bridge/dist/pi-extensions/lib/acp/models.js +3 -3
  11. package/mcp/entwurf-bridge/dist/pi-extensions/lib/acp/overlay.js +6 -2
  12. package/package.json +2 -2
  13. package/pi-extensions/acp-provider.ts +1 -1
  14. package/pi-extensions/lib/acp/models.ts +3 -3
  15. package/pi-extensions/lib/acp/overlay.ts +6 -2
  16. package/pi-extensions/lib/meta-session.ts +25 -0
  17. package/run.sh +71 -26
  18. package/scripts/agy-bridge.sh +1 -1
  19. package/scripts/agy-imprint.sh +10 -7
  20. package/scripts/check-acp-carrier-augment.ts +6 -5
  21. package/scripts/check-acp-cortex.ts +41 -0
  22. package/scripts/check-acp-provider-surface.ts +9 -6
  23. package/scripts/check-copilot-birth-hook.ts +3 -1
  24. package/scripts/check-copilot-receive-arm.ts +169 -21
  25. package/scripts/check-copilot-statusline.ts +3 -1
  26. package/scripts/check-gate-qualification.ts +10 -9
  27. package/scripts/check-hook-launch-topology.ts +6 -5
  28. package/scripts/check-install-surface.ts +2 -1
  29. package/scripts/check-meta-facts.ts +6 -4
  30. package/scripts/check-meta-hook-session-switch.ts +4 -3
  31. package/scripts/check-meta-identity-consumers.ts +8 -7
  32. package/scripts/check-meta-receiver-marker.ts +2 -1
  33. package/scripts/check-omp-birth-hook.ts +3 -2
  34. package/scripts/check-probe-bridge-command.ts +3 -1
  35. package/scripts/check-setup-qualification.sh +21 -0
  36. package/scripts/copilot-bridge-doctor.sh +15 -5
  37. package/scripts/copilot-bridge-install.sh +6 -2
  38. package/scripts/copilot-launch.sh +16 -2
  39. package/scripts/copilot-receive-bridge.sh +80 -13
  40. package/scripts/lib/reclaim-on-exit.ts +86 -0
  41. package/scripts/meta-bridge-doctor.sh +56 -15
  42. package/scripts/meta-bridge-install.sh +13 -7
  43. package/scripts/meta-bridge-uninstall.sh +6 -4
  44. package/scripts/mutants/acp-cortex.json +26 -2
  45. package/scripts/mutants/copilot-receive.json +26 -0
  46. package/scripts/mutants/omp-birth.json +23 -6
  47. package/scripts/mutants/setup-verdict.json +13 -0
  48. package/scripts/omp-bridge-doctor.sh +110 -41
  49. package/scripts/omp-bridge-install.sh +6 -2
  50. package/scripts/omp-receive-install.sh +7 -2
  51. package/scripts/raw-async-delivery/README.md +10 -1
  52. package/scripts/raw-codex-measure/README.md +689 -0
  53. package/scripts/raw-codex-measure/source-audit.md +243 -0
  54. package/scripts/raw-macos-measure/README.md +148 -0
  55. package/scripts/raw-macos-measure/probe.sh +389 -0
  56. package/scripts/smoke-meta-async-drift.sh +7 -5
  57. package/scripts/smoke-meta-install-state.sh +70 -19
  58. package/scripts/smoke-omp-bridge-state.sh +38 -0
  59. package/scripts/smoke-setup-verdict.sh +100 -0
@@ -287,6 +287,106 @@ rm -rf "$HOME/.omp" "$XDG_DATA_HOME/entwurf/omp-bridge" "$XDG_DATA_HOME/entwurf/
287
287
  "$XDG_DATA_HOME/entwurf/omp-config" "$XDG_DATA_HOME/entwurf/omp-receive" \
288
288
  "$XDG_DATA_HOME/entwurf/meta-bridge-omp" "$XDG_DATA_HOME/entwurf/omp-receive"
289
289
 
290
+ # ── S-9: rail certification is a SEPARATE axis from install success (#78 D1) ──
291
+ # The 0.20.0 macOS lane opened the installers to Darwin (meta-bridge-install.sh's
292
+ # platform gate became its own python3/node dependency instead of the platform
293
+ # name), and that removed the only thing which used to keep a detected Mac host
294
+ # non-green: the installer's refusal. A detected harness on Darwin now INSTALLS,
295
+ # every harness doctor still refuses there (NOT CERTIFIED — pending physical
296
+ # host), and `setup` runs no doctor. Hard Rule 17 names that shape non-green, so
297
+ # setup_harness_result does — and these cells are its ONLY executing consumer,
298
+ # because nothing else in this repo ever takes the Darwin branch.
299
+ #
300
+ # `uname` is faked on PATH exactly the way smoke-meta-install-state.sh already
301
+ # fakes it for the installer's own platform gate. Both directions are pinned so
302
+ # the fixture cannot pass for the wrong reason: the Linux twin below is the SAME
303
+ # sandbox, the SAME stub harnesses and the SAME fixture with one byte different,
304
+ # and S-3/S-8 above are the unfaked real-host Linux evidence.
305
+ FAKE_UNAME="$SB/fake-uname-darwin"; mkdir -p "$FAKE_UNAME"
306
+ # Absolute bash in the shebang, same reason as the sibling fixture: a cell may
307
+ # hand this script a PATH that does not carry `env`/`bash` itself.
308
+ cat > "$FAKE_UNAME/uname" <<SH
309
+ #!$(command -v bash)
310
+ printf '%s\n' Darwin
311
+ SH
312
+ chmod +x "$FAKE_UNAME/uname"
313
+ FAKE_UNAME_LINUX="$SB/fake-uname-linux"; mkdir -p "$FAKE_UNAME_LINUX"
314
+ cat > "$FAKE_UNAME_LINUX/uname" <<SH
315
+ #!$(command -v bash)
316
+ printf '%s\n' Linux
317
+ SH
318
+ chmod +x "$FAKE_UNAME_LINUX/uname"
319
+
320
+ omp_reset() {
321
+ rm -rf "$HOME/.omp" "$XDG_DATA_HOME/entwurf/omp-bridge" "$XDG_DATA_HOME/entwurf/omp-mcp" \
322
+ "$XDG_DATA_HOME/entwurf/omp-config" "$XDG_DATA_HOME/entwurf/omp-receive" \
323
+ "$XDG_DATA_HOME/entwurf/meta-bridge-omp"
324
+ }
325
+
326
+ # ── S-9a: fake Darwin + DETECTED harnesses → named non-green, install intact ──
327
+ # Two harness FAMILIES on purpose (the pi adapter rail and the four omp units):
328
+ # a rule applied to one backend and not the next is a new defect, not half a fix.
329
+ echo "[smoke-setup-verdict] S-9a detected harnesses on an uncertified platform"
330
+ PROJ9="$SB/proj9"; mkdir -p "$PROJ9"
331
+ seed_auth
332
+ set +e; OUT="$(PI_BIN="$SB/harness/pi-ok" OMP_BIN="$FAKE_OMP/omp" ENTWURF_OMP_AGENT_DIR="$HOME/.omp/agent" PATH="$FAKE_UNAME:$FAKE_OMP:$PATH" bash "$REPO_DIR/run.sh" setup "$PROJ9" 2>&1)"; RC=$?; set -e
333
+ want "S-9a: a detected harness on an uncertified platform owns a nonzero setup exit" "[ '$RC' -ne 0 ]"
334
+ want "S-9a: the pi adapter rail is named non-green, never a cosmetic PASS" \
335
+ "printf '%s' \"\$OUT\" | grep -q 'pi: FAIL' && ! printf '%s' \"\$OUT\" | grep -q 'pi: PASS'"
336
+ want "S-9a: all four omp units are named non-green, none cosmetically PASS" \
337
+ "printf '%s' \"\$OUT\" | grep -q 'omp-birth: FAIL' && printf '%s' \"\$OUT\" | grep -q 'omp-mcp: FAIL' && printf '%s' \"\$OUT\" | grep -q 'omp-config: FAIL' && printf '%s' \"\$OUT\" | grep -q 'omp-receive: FAIL' && ! printf '%s' \"\$OUT\" | grep -q 'omp-[a-z]*: PASS'"
338
+ want "S-9a: the reason says the wiring WAS written (this is not an install failure)" \
339
+ "printf '%s' \"\$OUT\" | grep -q 'the wiring WAS written and nothing failed to install'"
340
+ want "S-9a: the reason names the RAIL evidence state and the platform" \
341
+ "printf '%s' \"\$OUT\" | grep -q 'NOT CERTIFIED — pending physical host on Darwin'"
342
+ want "S-9a: the reason names the doctor that owns the rail axis, per component" \
343
+ "printf '%s' \"\$OUT\" | grep -qF \"owned by './run.sh doctor-omp-bridge'\" && printf '%s' \"\$OUT\" | grep -qF \"owned by './run.sh doctor-pi-provider'\""
344
+ want "S-9a: the reason points at the tracking issue" "printf '%s' \"\$OUT\" | grep -q 'Tracking: #78'"
345
+ want "S-9a: it never reads as an install refusal (no unsupported-platform / did-not-complete vocabulary)" \
346
+ "! printf '%s' \"\$OUT\" | grep -qi 'unsupported platform' && ! printf '%s' \"\$OUT\" | grep -q 'did not complete'"
347
+ want "S-9a: the summary is NON-GREEN and names the uncertified components" \
348
+ "printf '%s' \"\$OUT\" | grep -q 'NON-GREEN (FAIL:' && ! printf '%s' \"\$OUT\" | grep -q 'result: green'"
349
+ # The load-bearing half: the installs genuinely SUCCEEDED. Without this the cell
350
+ # would also pass if the platform had merely broken the installers.
351
+ want "S-9a: the wiring really landed — pi project settings plus both omp extensions and the MCP hand" \
352
+ "[ -f '$PROJ9/.pi/settings.json' ] && [ -d '$HOME/.omp/agent/extensions/entwurf-meta-omp' ] && [ -d '$HOME/.omp/agent/extensions/entwurf-receive-omp' ] && [ -f '$HOME/.omp/agent/mcp.json' ]"
353
+ want_auth_untouched "S-9a"
354
+ omp_reset
355
+
356
+ # ── S-9b: the Linux twin — same fixture, one byte different → still PASS/green ──
357
+ # This is the regression axis that matters most: the certified platform's behavior
358
+ # must not have moved at all.
359
+ echo "[smoke-setup-verdict] S-9b the same detected harnesses on the certified platform"
360
+ PROJ9B="$SB/proj9b"; mkdir -p "$PROJ9B"
361
+ seed_auth
362
+ set +e; OUT="$(PI_BIN="$SB/harness/pi-ok" OMP_BIN="$FAKE_OMP/omp" ENTWURF_OMP_AGENT_DIR="$HOME/.omp/agent" PATH="$FAKE_UNAME_LINUX:$FAKE_OMP:$PATH" bash "$REPO_DIR/run.sh" setup "$PROJ9B" 2>&1)"; RC=$?; set -e
363
+ want "S-9b: the certified platform still exits 0" "[ '$RC' -eq 0 ]"
364
+ want "S-9b: pi and all four omp units still compose as PASS" \
365
+ "printf '%s' \"\$OUT\" | grep -q 'pi: PASS' && printf '%s' \"\$OUT\" | grep -q 'omp-birth: PASS' && printf '%s' \"\$OUT\" | grep -q 'omp-mcp: PASS' && printf '%s' \"\$OUT\" | grep -q 'omp-config: PASS' && printf '%s' \"\$OUT\" | grep -q 'omp-receive: PASS'"
366
+ want "S-9b: a PASS row is byte-identical to the pre-#78 wording (the operator surface did not move)" \
367
+ "printf '%s' \"\$OUT\" | grep -q 'omp-birth: PASS — birth extension installed — verify: ./run.sh doctor-omp-bridge'"
368
+ want "S-9b: the computed summary is green and carries no rail-certification wording" \
369
+ "printf '%s' \"\$OUT\" | grep -q 'result: green (computed from the component outcomes above)' && ! printf '%s' \"\$OUT\" | grep -q 'NOT CERTIFIED'"
370
+ want_auth_untouched "S-9b"
371
+ omp_reset
372
+
373
+ # ── S-9c: fake Darwin + NO harness → still green (the macOS CI job's contract) ──
374
+ # The macos-install-surface job asserts exactly this shape on a real Darwin runner:
375
+ # five zero-state SKIPs, core PASS, computed green. The rule above must not reach
376
+ # an absent harness — SKIP is not a completed integration.
377
+ echo "[smoke-setup-verdict] S-9c harness-free host on an uncertified platform"
378
+ PROJ9C="$SB/proj9c"; mkdir -p "$PROJ9C"
379
+ seed_auth
380
+ set +e; OUT="$(PATH="$FAKE_UNAME:$PATH" bash "$REPO_DIR/run.sh" setup "$PROJ9C" 2>&1)"; RC=$?; set -e
381
+ want "S-9c: a harness-free uncertified host still exits 0" "[ '$RC' -eq 0 ]"
382
+ want "S-9c: all five harness probes are still zero-state SKIPs" \
383
+ "printf '%s' \"\$OUT\" | grep -q 'pi: SKIP' && printf '%s' \"\$OUT\" | grep -q 'claude: SKIP' && printf '%s' \"\$OUT\" | grep -q 'agy: SKIP' && printf '%s' \"\$OUT\" | grep -q 'copilot: SKIP' && printf '%s' \"\$OUT\" | grep -q 'omp: SKIP'"
384
+ want "S-9c: core still PASSes and the computed summary is still green" \
385
+ "printf '%s' \"\$OUT\" | grep -q 'core: PASS' && printf '%s' \"\$OUT\" | grep -q 'result: green (computed from the component outcomes above)'"
386
+ want "S-9c: an absent harness is never given a rail verdict it did not earn" \
387
+ "! printf '%s' \"\$OUT\" | grep -q 'NOT CERTIFIED'"
388
+ want_auth_untouched "S-9c"
389
+
290
390
  # ── S-5: installed mode is a NAMED first verdict, never the source bootstrap ──
291
391
  # A bare copy of run.sh under a fake node_modules root pins the mode seam
292
392
  # cheaply: the copy is NOT a runnable installed package (no dist), so this cell