Skip to content

Workspace, shared-memory tools and native execution hardening - #162

Merged
usrname1git merged 6 commits into
mainfrom
feat/workspace-aai-native-hardening-20261107
Nov 7, 2026
Merged

usrname1git merged 6 commits into
mainfrom
feat/workspace-aai-native-hardening-20261107

Conversation

@usrname1git

@usrname1git usrname1git commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Deliver the accumulated GodBrain updates on top of current main, preserving the repairs already merged in #159, #160 and #161.

  • Replace the retired Galaxy page with native-served Workspace: seven shelves, bounded map/list browsing, explicit canonical judgments, separate untrusted answer assessments, isolated personal notes, passive System snapshots and desktop/mobile browser regressions. Existing Galaxy URLs redirect.
  • Add authenticated native aai shared-memory tools, explicit CLI thread identities, exact Discussion-save receipts, bounded Research handoffs and browser exports. Preserve the shared desk default and keep -NoSharedMemory stateless and tool-less.
  • Harden native boundaries: a shared mandatory-Job subprocess supervisor, restricted handle inheritance, bounded I/O/deadlines, handle-bound filesystem operations, handle-relative child opens/renames, exclusive random staging files, exact protected-directory naming and fresh bearer-plus-YOLO checks. Missing ACL restore keys are refused before elevation. Architecture proposals stage untrusted Research rather than executing.
  • Bind Librarian provenance to the prompt actually executed; carry retry feedback and reject invalid source-byte/UTF-8 spans and mismatched persistence receipts.
  • Include the accumulated Desk/AirPlay exact-process identity fixes, ClipShare still-image sender integration, conservative source/runtime-bound CS2 scan receipts and expanded source-bound showcase capture/catalog support.
  • Extend the existing Windows CI workflow with the complete offline native gate, Workspace browser coverage and the additional client/media/scanner fixtures.
  • Replace the deprecated Node20-based artifact action with SHA-pinned upload-artifact v7.0.2, whose declared runtime is Node24; preserve evidence paths, retention and permissions.

Validation

Final head 4f26d9782d5a2616bf09342bb052946b219e9fb1 passed the complete
hosted Windows gate.

The final job has no warning annotations; the previous Node20 artifact-action
deprecation warning is gone.

Run against this integrated publication worktree, not inferred from the previously deployed dirty checkout:

  • Complete offline Test-JarvisLoop.ps1: 21/21 tasks passed, including process/path/Librarian regressions, production kernel linking, reply fixtures and missing-OS-pin isolation.
  • Actual Workspace desktop/mobile browser tests: 7/7 passed.
  • Native AirPlay warnings-as-errors build and offline self-test.
  • Offline shared-memory, CS2 scanner, AirPlay, ClipShare, Desk UI smoke/model/attachment and synthetic local-only showcase publication fixtures.
  • Current-source gallery acceptance passed at desktop/mobile sizes with all 5 projects / 12 hash-bound images, screenshot-description search, zoom, themes and print rendering. Two real CPU-only workflow captures also passed in separate generations; no new live host capture was needed.
  • Changed PowerShell parsing, staged whitespace and publication-data checks.

The hosted gate exposed old native test assumptions about this host's checkout,
installed SysInternals and running models. Repository/rails checks now use an
owned synthetic Git repository populated from the publication sources under an
already-granted root. Missing optional tools must report their absence; the
offline suite does not require a live model or kernel. Production grants were
not expanded to make CI pass.

All three initial automatic-review findings are repaired: refreshes use fresh
immutable capture generations while preserving unselected PNG/receipt pairs,
gallery expectations derive from the loaded catalog, and the Monitor capture
assertions now execute as an independent fixture. Targeted publisher, browser,
script-parse and actual Desk UI-smoke checks passed after these repairs.

No model generation, service restart, host repair or production deployment is part of this PR validation. Fixture passes are not automatic Golden Records or proof of current host readiness.

Publication boundaries

Private local settings, credentials, transcripts, research/hardware scratch, model/media files and generated build outputs are excluded. The original working checkout is left untouched.

The standalone native ClipShare image backend is still in its separate local-only repository, which has no commits or remote. This GodBrain PR contains its Desk/SendTo integration, not an undeclared relocation or publication of that backend. A separate repository destination is needed to publish it.

The full-browser showcase acceptance uses a local batch built from the existing sanitized captures and a dedicated portfolio checkout; it is not a hermetic CI fixture and does not publish to the portfolio. The local-only synthetic publisher guards remain in the existing workflow.

Integrate authenticated aai shared-memory tools and exact persistence receipts, handle-bound filesystem operations, mandatory-Job subprocess supervision and Librarian evidence validation.

Include accumulated Desk/AirPlay and ClipShare integration fixes, source-bound CS2 scan receipts, showcase support and expanded offline CI coverage. Preserve repairs already merged into main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 00:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Repeated refreshes fail on existing capture files, Monitor capture assertions never execute, and browser acceptance expectations no longer match the expanded catalog.

3 open issues
What changed in this PR

This PR builds on #159–#161 to introduce Workspace, extend native shared-memory access, and harden execution boundaries without changing Golden Record admission rules.

Changes:

  • Replace Galaxy-facing entry points with Workspace, including shelf browsing, operator review controls, and browser regressions.
  • Add authenticated shared-memory client tools, bounded handoff exports, and shared native subprocess supervision.
  • Extend Desk media controls, source-bound showcase captures, documentation, and offline Windows CI coverage.
File Description
Test-GodBrainDesk.ps1 Check Workspace assets and legacy redirects.
Start-GodBrain.ps1 Advertise Workspace startup URLs.
scripts/​Verify-LocalEdit.ps1 Run browser checks for Workspace edits.
scripts/​Test-SharedMemory.ps1 Cover native client receipts, scopes, and exports.
scripts/​Test-JarvisLoop.ps1 Add native boundary regression fixtures.
scripts/​Test-DeskMenu.ps1 Add Monitor capture and icon checks.
scripts/​Test-ClipShare.ps1 Cover sender validation and file-picker integration.
scripts/​Test-AirPlay.ps1 Exercise exact-process termination and escalation failures.
scripts/​Show-DeskMenu.ps1 Add Workspace access, media controls, and capture views.
scripts/​Refresh-Showcase.ps1 Include additional named showcase captures.
scripts/​Invoke-LocalLLM.ps1 Route shared mode through authenticated native tools.
scripts/​GodBrain-SharedMemory.ps1 Add validated Research handoffs and bounded exports.
scripts/​GodBrain-ClipShare.ps1 Launch the external native per-file sender.
scripts/​GodBrain-AirPlay.ps1 Add bounded, identity-checked force-stop handling.
scripts/​Build-DeskAirPlay.ps1 Link security APIs for ownership checks.
README.md Document Workspace and updated native boundaries.
godbrain_core/​showcase/​projects.json Expand projects and capture descriptions.
godbrain_core/​showcase/​index.html Update gallery introduction and search hints.
godbrain_core/​showcase/​gallery.js Include image descriptions in project search.
godbrain_core/​frontend/​workspace.test.mjs Add desktop/mobile interaction and trust-boundary checks.
godbrain_core/​frontend/​workspace.html Define Workspace shelves, reader, assistant, and dialogs.
godbrain_core/​frontend/​tidal.svg Add a Workspace wallpaper asset.
godbrain_core/​frontend/​courtyard.svg Add an alternate Workspace wallpaper.
godbrain_core/​frontend/​capture-workspace.mjs Produce redacted captures with source-hash receipts.
godbrain_core/​cpp_tools/​windows_process.h Centralize Job-contained, bounded subprocess execution.
godbrain_core/​cpp_tools/​librarian_test.cpp Check prompt provenance, evidence spans, and receipts.
godbrain_core/​cpp_tools/​desk_airplay.cpp Add exact-receiver termination with ownership and expiry checks.
godbrain_core/​cpp_kernel/​windows_process_test.cpp Exercise process limits, containment, and handle isolation.
godbrain_core/​cpp_kernel/​surgery.cpp Adopt the shared subprocess supervisor.
godbrain_core/​cpp_kernel/​shared_context_test.h Extend shared-memory persistence fixtures.
godbrain_core/​cpp_kernel/​memory.cpp Supervise native store calls with bounded I/O.
godbrain_core/​cpp_kernel/​local_tools.h Extend request-scoped authorization and memory interfaces.
godbrain_core/​cpp_kernel/​local_tools_test.cpp Stub live shared-memory access in offline tests.
godbrain_core/​cpp_kernel/​local_process_test.cpp Check arguments, output limits, and process cleanup.
godbrain_core/​cpp_kernel/​local_edit.cpp Classify Workspace files for verification.
godbrain_core/​cpp_kernel/​local_edit_test.cpp Move excerpt and edit fixtures to Workspace.
godbrain_core/​cpp_kernel/​kernel.cpp Stage architecture proposals without executing them.
godbrain_core/​cpp_kernel/​kernel_dispatch_test.cpp Verify proposal staging and execution separation.
docs/​desk-menu.md Explain updated client, media, and capture workflows.
docs/​architecture/​reference.md Document authorization, supervision, and provenance contracts.
docs/​architecture/​current.md Describe Workspace and handle-bound filesystem operations.
ARCHITECTURE.md Rename the UI node to Workspace.
AGENTS.md Document shared-memory handoffs and native supervision.
.github/​workflows/​desk-and-gym.yml Extend Windows CI triggers and offline regression coverage.

Review effort: Balanced

Comment thread godbrain_core/showcase/projects.json Resolved
Comment thread scripts/Test-DeskMenu.ps1 Resolved
Autismo and others added 3 commits November 7, 2026 01:47
Use an owned synthetic Git repository under an existing granted root, copied from the tested source checkout. Check explicit missing SysInternals diagnostics and do not require live model/kernel processes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use fresh capture generations, preserve unselected source pairs, derive gallery expectations from the loaded catalog, and run the Monitor capture assertions outside Assert-Throws.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin verified upload-artifact v7.0.2 while preserving the existing evidence paths, retention and permissions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The “Answer / no tools” option still enables read-only tools, including filesystem and host reads, so its label must be changed to “Answer / read-only” to match its behavior.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Rename “Answer / no tools” to reflect read-only tool access

godbrain_core/​frontend/​workspace.html:76

Selecting “Answer / no tools” still sends tool_mode: 'answer', which enables bounded read-only tools, including filesystem and host reads. The label therefore promises a tool-less request that this selection does not provide. Rename it to “Answer / read-only”; a leading No tools message remains the explicit tool-less path.

3 resolved since last review

Review effort: Balanced

Select the visible read-only label in the existing browser regression while preserving the answer request mode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@usrname1git

Copy link
Copy Markdown
Owner Author

Fixed the newly identified answer-mode label in commit c9089e8. The UI now says Answer / read-only; the existing browser regression selects that visible label and confirms tool_mode remains answer. Workspace browser regressions passed 7/7 locally. Holding merge until the new head passes hosted CI and a fresh Copilot review clears it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed for an unpublished finding that a broken pilot-plan link leaves usage instructions, qualification criteria, and completion guidance inaccessible.

No open issues 🎉

Review effort: Balanced

Restore the linked local-file usage, qualification gates and completion guidance without changing scanner behavior or implying model qualification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@usrname1git

Copy link
Copy Markdown
Owner Author

Addressed the review's unpublished pilot-plan warning in commit adfbb00. docs/desk-menu.md linked docs/cs2-deadtime-plan.md, but that existing local document had not been included in the PR. The referenced document is now tracked and contains local-file usage, offline/media checks, held-out qualification criteria and the separate trimmed-library completion target. Checked its current commands and receipt-state limits against the scanner/test source; no runtime behavior or model qualification changed. The c9089e8 hosted CI run passed; requesting fresh review and exact-head CI again before merge.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The shared Job supervisor and Admin/TrustedInstaller AirPlay termination ladder alter privileged Windows process lifetimes, requiring targeted Windows runtime validation of elevation delays, cancellation, and containment failures not established by offline fixtures.

No open issues 🎉

Review effort: Balanced

@usrname1git

Copy link
Copy Markdown
Owner Author

Conditional merge is held. Both follow-up findings are repaired: the answer-mode label in c9089e8 and the missing pilot-plan target in adfbb00. Final-head Windows CI run 42340790048 passed. The latest Copilot review covers adfbb00 and reports no open code issues, but still requests live elevated process-lifecycle validation. Inspected the test source: windows_process_test executes actual user-context child/descendant processes with timeouts, containment faults and handle-isolation checks; Test-AirPlay exercises the Admin/TrustedInstaller ladder through mocked child invocations. Those tests do not prove real elevation delays/cancellation behavior. No live elevation test, merge, or runtime restart was performed. The operator condition was merge if the review clears, so this remaining qualification request is not treated as an all-clear.

@usrname1git

Copy link
Copy Markdown
Owner Author

Targeted Windows runtime qualification completed for exact head adfbb00aa5ccdfe5b8de19ccd696affa7c7e228e, with operator authorization to interrupt AirPlay. No production source changes were needed.

Check Actual result
Verified Medium caller Start/Open/Stop, singleton/listener, exact forced exit and wrong creation/SID refusal passed; actor and restored receiver had integrity 0x2000, non-elevated.
Shared native Job suite Unchanged production suite passed with real children under Medium, Admin (0x3000) and TrustedInstaller (0x4000, enabled TI service SID) tokens. It covers stdin/stream limits, deadlines, descendants, inherited-handle isolation, concurrent pipes, and injected Job creation/assignment/resume/wait failures.
Delayed Admin/TI requests Both rejected expired deadlines with the pinned receiver still alive (1.888s / 1.759s measured).
Admin/TI launcher cancellation by timeout Immediate launcher waits failed explicitly at 1.011s / 1.002s. The observed elevated children subsequently rejected expired termination requests and exited; the receiver survived. No remaining fixture processes were observed.
Actual privileged termination Direct Admin and TI native helpers terminated the exact validated receiver; pinned exit handles signalled, in 20ms / 23ms. Receiver restored non-elevated afterward.

Important limit: this does not claim an automated UAC consent grant or a clicked UAC Cancel button. A real Medium-to-Admin launch hit the existing 12s wrapper timeout before an elevated fixture receipt was observed. Privileged positive checks then used already-held elevated authority. Exit-1223 branching remains covered by the existing mocked fixture; actual launcher timeout/late-execution behavior was exercised above. This distinction is retained in the evidence, not counted as a successful Medium-to-Admin grant.

Fresh helper build used /W4 /WX and passed its native self-test. Compiled AirPlay source SHA256: 27D5D34CA5EF34066190AC9D531F56EDD0BAA4CBFFA17435394CE22D7470D58A; helper SHA256: 4399FC3CD10C703A92B34AC683185DBD47A6D2D1791DA88BDFED55EE6E8F60EE. Production supervisor source SHA256: 402E1C95D99E60DA34B54277378BEAE61E12657A97B622C8ADB5E43D1781AC45.

Exact-head Windows CI remains successful. Original dirty checkout/index and running kernel/models were preserved; no configuration, ACL or unrelated service repairs were made. Requesting a final review with this runtime evidence before conditional landing.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The privileged AirPlay stop and Windows execution paths require host validation because offline mocks cannot establish containment, session/owner preservation, cancellation, or timeout cleanup.

No open issues 🎉

Review effort: Balanced

@usrname1git
usrname1git merged commit 0964feb into main Nov 7, 2026
3 checks passed
@usrname1git
usrname1git deleted the feat/workspace-aai-native-hardening-20261107 branch November 7, 2026 23:33
@usrname1git

Copy link
Copy Markdown
Owner Author

Merged to main as 0964feb after SHA-pinned clearance of adfbb00. GitHub readback confirms MERGED; main points to the merge, its second parent is the qualified head, and its tree matches that head exactly. No protection bypass, auto-merge, stack mutation, force-push or branch deletion was requested.

The fresh 23:19:18Z Copilot review is COMMENTED, not APPROVED. It introduced no open findings and repeated the need for host validation. Engineering clearance rests on the actual Medium/Admin/TrustedInstaller native checks and exact-head Windows CI, documented in #162 (comment), rather than the review label. Medium-to-Admin UAC consent and an actual Cancel-button click were not automated; positive privileged cases used existing elevated authority, while the incomplete Medium-to-Admin launch timed out explicitly.

ShairportQt was finally verified restored as a Medium, non-elevated receiver, ready on :5000. This is not an automated audio-output pass. The original dirty checkout HEAD/index were preserved. Owned temporary test binaries were removed; source and receipts retained. Dell reads measured 3.82s cold and 0.16s warm with a responsive offscreen heartbeat; no performance fix or full-window freeze diagnosis is claimed.

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