[PR #305] [MERGED] feat: harden authority and runtime conformance boundaries #1941

Closed
opened 2026-10-16 21:12:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/305
Author: @morluto
Created: 7/18/2026
Status: ✅ Merged
Merged: 7/18/2026
Merged by: @morluto

Base: main ← Head: codex/issue-audit-milestone


📝 Commits (5)

  • 37f4ac6 refactor: simplify doctor and error projections
  • e6cfce3 feat(permissions): add scoped process capture elicitation
  • da1da3b test(hopper): add semantic runtime conformance
  • a1a6b42 feat(windows): define native authority boundary
  • 49f1ec1 fix: remove unused boundary exports

📊 Changes

163 files changed (+10341 additions, -937 deletions)

View changed files

📝 .github/workflows/real-hopper.yml (+4 -12)
📝 README.md (+4 -0)
➕ docs/adr/0004-windows-native-authority-packaging.md (+531 -0)
📝 docs/adr/README.md (+1 -0)
📝 docs/api/assets/hierarchy.js (+1 -1)
📝 docs/api/assets/navigation.js (+1 -1)
📝 docs/api/assets/search.js (+1 -1)
📝 docs/api/classes/application_PermissionAuthority.PermissionAuthority.html (+26 -13)
📝 docs/api/classes/application_PermissionAuthority.PermissionPathError.html (+1 -1)
📝 docs/api/classes/application_ProcessCaptureError.ProcessCaptureError.html (+1 -1)
📝 docs/api/classes/application_ProjectPermissionStore.ProjectPermissionStoreError.html (+5 -5)
➕ docs/api/classes/application_WindowsNativeAuthority.WindowsNativeAuthority.html (+167 -0)
➕ docs/api/classes/application_WindowsNativeAuthority.WindowsNativeAuthorityError.html (+101 -0)
➕ docs/api/classes/application_WindowsNativeAuthorityLoader.WindowsNativeAuthorityPackageLoader.html (+86 -0)
📝 docs/api/classes/browser_BrowserProcessStartup.BrowserStartupError.html (+1 -1)
📝 docs/api/classes/ghidra_GhidraLauncher.GhidraLaunchError.html (+1 -1)
📝 docs/api/classes/ghidra_GhidraSessionError.GhidraSessionError.html (+1 -1)
📝 docs/api/classes/ghidra_protocol.GhidraRemoteError.html (+1 -1)
📝 docs/api/classes/process_PrivateRuntimeRoot.PrivateRuntimeRoot.html (+7 -6)
📝 docs/api/functions/application_CapabilityInventory.buildCapabilityInventory.html (+4 -4)

...and 80 more files

📄 Description

What changed

  • Add per-connection MCP elicitation for exact process-capture grants, including signed request state, replay limits, fail-closed ceilings, grant rollback, secure POSIX project-store reads, and reload recovery.
  • Add source-owned real-Hopper semantic and pagination fixtures that verify assembly, calls, references, strings, names, comments, document identity, and bounded collection behavior.
  • Define the provider-neutral Windows native authority and packaging boundary for handle admission, private DACLs, Job Object ownership, bounded process capture, and runtime projections. The package loader remains dormant until a pinned native artifact digest is supplied.
  • Split Doctor diagnostic collection from orchestration and simplify shared error projections without changing caller-visible behavior.
  • Regenerate the product catalog and TypeDoc API reference.

Why

The issue audit identified three related gaps: process capture still needed a modern scoped consent path, Hopper claims needed real semantic proof instead of structural checks, and Windows Job Object/reparse/DACL work needed an accepted provider-neutral contract before native implementation. Doctor and error projection complexity also remained a measured maintenance hotspot.

Impact

Process-capture authorization is narrower and fails closed on tampering, replay, unsafe persistence, or unavailable ownership checks. Hopper verification now rejects missing or internally inconsistent semantic evidence. Windows-native functionality is design- and contract-complete at the TypeScript boundary but is not advertised as available without the native package and real non-admin Windows proof.

The canonical MCP inventory remains 95 tools; no tool was added or removed.

Suggested review order

  1. src/server/ProcessCaptureElicitation.ts, src/application/PermissionAuthority.ts, and src/application/ProjectPermissionStore.ts
  2. scripts/lib/real-hopper-*.mjs and src/application/RealHopperAssertions.ts
  3. docs/adr/0004-windows-native-authority-packaging.md, src/application/WindowsNativeAuthority.ts, and its loader
  4. src/application/Doctor.ts and src/application/DoctorDiagnostics.ts
  5. Generated catalog and TypeDoc output

Validation

  • npm run docs:generate
  • npm run check — 161 test files passed; coverage thresholds passed
  • npm run verify:package — packaged CLI/MCP boundary passed with 95 tools and 6 prompts
  • npm pack --dry-run — 401 files, 600.7 kB package
  • Independent exact-diff security review of the permission and Windows-native boundaries
  • Focused Hopper/Doctor, permission, and Windows-native regression suites
  • git diff --check

Real Hopper verification was not run because a licensed Hopper runtime and two operator-provided binaries were not available in this environment. Windows-native real proof was not run because the pinned native package is intentionally absent (artifactSha256: null); the boundary remains unavailable until #288–#290 deliver and verify it. Real browser behavior is unchanged.

Progresses #55, #96, #142, #151, #172, #287, #288, #289, and #290.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/305 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/18/2026 **Status:** ✅ Merged **Merged:** 7/18/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/issue-audit-milestone` --- ### 📝 Commits (5) - [`37f4ac6`](https://github.com/morluto/rea/commit/37f4ac6d7073693fb4d2290b5aff6bcb6b36cd19) refactor: simplify doctor and error projections - [`e6cfce3`](https://github.com/morluto/rea/commit/e6cfce3902a8f0c403caa07e2c597e8156aa5498) feat(permissions): add scoped process capture elicitation - [`da1da3b`](https://github.com/morluto/rea/commit/da1da3bfb83e2fdd2a7a0a84a6a70aa73a4a68d6) test(hopper): add semantic runtime conformance - [`a1a6b42`](https://github.com/morluto/rea/commit/a1a6b4200ed638b1ea4d186ae1253805032d002a) feat(windows): define native authority boundary - [`49f1ec1`](https://github.com/morluto/rea/commit/49f1ec14fe4f5b67345ff9dde8af8ef1066fb3c8) fix: remove unused boundary exports ### 📊 Changes **163 files changed** (+10341 additions, -937 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/real-hopper.yml` (+4 -12) 📝 `README.md` (+4 -0) ➕ `docs/adr/0004-windows-native-authority-packaging.md` (+531 -0) 📝 `docs/adr/README.md` (+1 -0) 📝 `docs/api/assets/hierarchy.js` (+1 -1) 📝 `docs/api/assets/navigation.js` (+1 -1) 📝 `docs/api/assets/search.js` (+1 -1) 📝 `docs/api/classes/application_PermissionAuthority.PermissionAuthority.html` (+26 -13) 📝 `docs/api/classes/application_PermissionAuthority.PermissionPathError.html` (+1 -1) 📝 `docs/api/classes/application_ProcessCaptureError.ProcessCaptureError.html` (+1 -1) 📝 `docs/api/classes/application_ProjectPermissionStore.ProjectPermissionStoreError.html` (+5 -5) ➕ `docs/api/classes/application_WindowsNativeAuthority.WindowsNativeAuthority.html` (+167 -0) ➕ `docs/api/classes/application_WindowsNativeAuthority.WindowsNativeAuthorityError.html` (+101 -0) ➕ `docs/api/classes/application_WindowsNativeAuthorityLoader.WindowsNativeAuthorityPackageLoader.html` (+86 -0) 📝 `docs/api/classes/browser_BrowserProcessStartup.BrowserStartupError.html` (+1 -1) 📝 `docs/api/classes/ghidra_GhidraLauncher.GhidraLaunchError.html` (+1 -1) 📝 `docs/api/classes/ghidra_GhidraSessionError.GhidraSessionError.html` (+1 -1) 📝 `docs/api/classes/ghidra_protocol.GhidraRemoteError.html` (+1 -1) 📝 `docs/api/classes/process_PrivateRuntimeRoot.PrivateRuntimeRoot.html` (+7 -6) 📝 `docs/api/functions/application_CapabilityInventory.buildCapabilityInventory.html` (+4 -4) _...and 80 more files_ </details> ### 📄 Description ## What changed - Add per-connection MCP elicitation for exact process-capture grants, including signed request state, replay limits, fail-closed ceilings, grant rollback, secure POSIX project-store reads, and reload recovery. - Add source-owned real-Hopper semantic and pagination fixtures that verify assembly, calls, references, strings, names, comments, document identity, and bounded collection behavior. - Define the provider-neutral Windows native authority and packaging boundary for handle admission, private DACLs, Job Object ownership, bounded process capture, and runtime projections. The package loader remains dormant until a pinned native artifact digest is supplied. - Split Doctor diagnostic collection from orchestration and simplify shared error projections without changing caller-visible behavior. - Regenerate the product catalog and TypeDoc API reference. ## Why The issue audit identified three related gaps: process capture still needed a modern scoped consent path, Hopper claims needed real semantic proof instead of structural checks, and Windows Job Object/reparse/DACL work needed an accepted provider-neutral contract before native implementation. Doctor and error projection complexity also remained a measured maintenance hotspot. ## Impact Process-capture authorization is narrower and fails closed on tampering, replay, unsafe persistence, or unavailable ownership checks. Hopper verification now rejects missing or internally inconsistent semantic evidence. Windows-native functionality is design- and contract-complete at the TypeScript boundary but is not advertised as available without the native package and real non-admin Windows proof. The canonical MCP inventory remains 95 tools; no tool was added or removed. ## Suggested review order 1. `src/server/ProcessCaptureElicitation.ts`, `src/application/PermissionAuthority.ts`, and `src/application/ProjectPermissionStore.ts` 2. `scripts/lib/real-hopper-*.mjs` and `src/application/RealHopperAssertions.ts` 3. `docs/adr/0004-windows-native-authority-packaging.md`, `src/application/WindowsNativeAuthority.ts`, and its loader 4. `src/application/Doctor.ts` and `src/application/DoctorDiagnostics.ts` 5. Generated catalog and TypeDoc output ## Validation - `npm run docs:generate` - `npm run check` — 161 test files passed; coverage thresholds passed - `npm run verify:package` — packaged CLI/MCP boundary passed with 95 tools and 6 prompts - `npm pack --dry-run` — 401 files, 600.7 kB package - Independent exact-diff security review of the permission and Windows-native boundaries - Focused Hopper/Doctor, permission, and Windows-native regression suites - `git diff --check` Real Hopper verification was not run because a licensed Hopper runtime and two operator-provided binaries were not available in this environment. Windows-native real proof was not run because the pinned native package is intentionally absent (`artifactSha256: null`); the boundary remains unavailable until #288–#290 deliver and verify it. Real browser behavior is unchanged. ## Related issues Progresses #55, #96, #142, #151, #172, #287, #288, #289, and #290. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:12:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1941
No description provided.