Skip to content

UH 1.0: runtime supervision and governed verification - #237

Draft
Mateo-GarciaL wants to merge 1 commit into
mainfrom
Mateo-GarciaL/uh-1.0-clean
Draft

Mateo-GarciaL wants to merge 1 commit into
mainfrom
Mateo-GarciaL/uh-1.0-clean

Conversation

@Mateo-GarciaL

Copy link
Copy Markdown
Collaborator

Summary

Consolidates the unreleased UH 1.0 development work for further implementation and review. This is a draft, not a release-ready integration.

  • Add native Command Code and Claude Code adapters and tool-guard integration.
  • Extend runtime supervision, cancellation, recovery, settlement, usage accounting, and resource-bounded team execution.
  • Add worker contracts, output verification, independent review, and optional typed semantic evaluation during verification and review.
  • Preserve reusable acceptance definitions and deterministic smoke procedures without committing generated execution histories.
  • Update the changelog, runtime reference, architecture documentation, and 1.0 roadmap to distinguish implemented behavior from remaining work.

Validation

  • bun install --frozen-lockfile — passed in the clean publication checkout.
  • bun run typecheck — passed.
  • bun run build — passed.
  • bun run test — 91 test files, 1,065 tests passed.
  • No paid-provider or live-model acceptance runs were performed as part of this publication check.

Remaining work

The 1.0 roadmap describes the outstanding integration and release criteria. These include complete mission-packet persistence, coordinator monitoring/reconnect and steering, adapter isolation and permission attribution, incremental accounting, broader decision-policy integration, and connected release acceptance.

Passing deterministic checks does not establish live-provider behavior or 1.0 readiness. The generated acceptance report currently includes links for absent evidence; this renderer limitation is recorded in the roadmap.

@LaloLalo1999

Copy link
Copy Markdown
Contributor

Status review — CI is red on Linux for platform-dependent test assumptions

I reproduced this branch locally on macOS and read the failing CI job. The Typecheck + tests + build failure is not a flake and not a product defect in the adapters: it is a set of POSIX-vs-Windows assumptions in the new tests plus one real path-handling bug in the tool guard.

What passes

  • bun install --frozen-lockfile, bun run typecheck, bun run build: clean.
  • Pack + publish dry-run: green. semgrep scan: green.
  • The branch already carries the specs/templates path fix, so it does not inherit the docs/specs/templates ENOENT failures that currently make main red.
  • Draft, MERGEABLE, no reviews yet.

What fails (13 tests across 5 files on macOS)

File Failures Root cause
tests/tool-guard.test.ts 5 Real bug. normalized() in src/harness/tool-guard.ts resolves with the host path module only. Windows-style targets (out\x.txt, Remove-Item out\a.csv,out\b.csv, Copy-Item ... -Destination out\x.csv) are one literal filename on POSIX, so inside() / protectedRoot() misclassify write_outside / delete_outside where the table expects undefined / protected_root. Green on Windows, red on Linux CI.
tests/acceptance.test.ts 3 mkdtemp("T:/tmp/...") hardcodes a Windows drive path; fails with ENOENT off Windows.
tests/independent-review.test.ts 3 The fixture writes reviewer.cjs with no shebang and no exec bit, then points cli_command at it. POSIX spawn fails with EACCES/ENOENT, so executeFixture gets failed instead of passed.
tests/oh-my-pi.test.ts 1 "writes canonical host artifacts while a real child stays in sandbox cwd" compares the child cwd against the unresolved /tmp/... root; on macOS /tmp resolves to /private/tmp, so the inspector throws and the run is recorded as failed. macOS-only, likely green on Linux CI.
tests/command-code.test.ts 1 (local only) The hook-path assertion needs dist/extensions/tool-guard/cmdc-hook.js. CI builds before testing so this passes there; it only fails in a fresh checkout without a build.

Suggested fixes

  1. tool-guard path handling — normalize both sides platform-neutrally before resolving (treat \ as a separator regardless of host, e.g. convert to / and compare, or resolve with path.win32 when either side is a Windows-style path). This is the one change worth landing regardless of CI, because the guard's whole job is judging Windows-style agent commands.
  2. acceptance tests — use os.tmpdir() instead of T:/tmp; keep the Windows-style workspace/artifact_root strings in the evidence fixtures (those are data, not filesystem operations).
  3. independent-review fixture — write the reviewer as .mjs and set cli_command to process.execPath with the script as an argument, or add a shebang plus chmod 0o755.
  4. oh-my-pi cwd assertion — compare against await realpath(sandboxRoot).

Local verification after those fixes

With fixes 1–4 applied locally: bun run typecheck clean, bun run test882/882 passing, 74/74 files (from 13 failing), bun run build clean, uh --help / uh status --json smokes clean.

I have not pushed to this branch. If useful, I can open a small PR against Mateo-GarciaL/uh-1.0-clean with exactly those four fixes so CI goes green and review can focus on the substance (supervision, cancellation, recovery, accounting, worker contracts, command-code/claude-code adapters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants