Skip to content

Add read-only inspection and manual website builds with shared lessons - #160

Merged
usrname1git merged 6 commits into
mainfrom
feat/desk-inspection-builder-lessons-20261101
Nov 3, 2026
Merged

usrname1git merged 6 commits into
mainfrom
feat/desk-inspection-builder-lessons-20261101

Conversation

@usrname1git

Copy link
Copy Markdown
Owner

Summary

  • Add bounded read-only tools to Answer and Research, including authenticated, operator-named protected-directory metadata only and exact request-bound public HTTPS reads. Preserve whole observations and report explicitly when an observation was not supplied to the model.
  • Make website builds start/regenerate only on explicit request, retain saved/passing versions, and keep course autoplay separate. Share source-checked, exact-evaluator, two-fixture lessons between local lab models through a dedicated gym-memory collection, not Alexandria.
  • Update Desk controls/documentation, document one-request Golden Record judgment and library-first SRE development, and save the native sensor replacement investigation as a plan only.

Prepared on current main, preserving the reliability fixes already merged in #159 instead of copying stale versions over them. This PR contains 26 source/documentation/test files; no binaries, local transcripts, recovery receipts, editor settings or host registry changes.

Validation

  • Offline scripts\Test-JarvisLoop.ps1: 16/16 passed, including production compile/link and normal/missing-pin reply fixtures. Registry-write fixtures were explicitly skipped with GODBRAIN_REPLY_TEST_NO_REGISTRY_WRITES=1; no live model was used.
  • scripts\Test-DeskMenu.ps1 -UiSmoke, Test-DeskModel.ps1, Test-DeskAttachments.ps1, and Test-ClipShare.ps1: all passed.
  • Frontend lab npm test: 136 tests, 127 passed, 9 failed, 0 skipped. All nine named failures also reproduce on unchanged main (cfc499e) in targeted reruns: 0 passed / 9 failed on each tree. These are existing reference-fixture incompatibilities with the protected one-surface evaluator, not new builder/shared-lesson failures. An initial browser-crash variant did not recur in the targeted comparison. The evaluator was not weakened.
  • PowerShell parsing, staged whitespace/conflict checks, selected documentation links, and staged credential/local-data preflight passed.

The full gym run exercised its existing Mongo-gated tests. Targeted baseline comparisons did not run those tests; there were no Alexandria writes.

Boundaries and remaining limitations

  • No live deployment, model launch, sensor implementation, hardware writes, host repair or automatic merge.
  • Live public-HTTPS and privileged helper execution were not exercised; native coverage here is offline.
  • The Golden Record guidance removes redundant operator judgment, not evidence gates. Historical/operator-authored recovery cases still lack a supported freshness profile and remain withheld by canonical retrieval; that runtime limitation is not fixed here.
  • ClipShare's documented direct-player behavior depends on its separately installed backend, which is not bundled in this repository.
  • Bearer authorization, sovereignty checks, immutable sources, promotion/freshness checks and personal/technical isolation remain required.

Integrate bounded Answer/Research inspection and truthful evidence-delivery
receipts while preserving current-main recovery and shared-context fixes.
Keep website builds explicit and reuse qualified lab lessons across models.
Document one-request Golden Record judgment and library-first SRE work.

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

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

Unresolved critical issues bypass exact-directory and explicit no-tools restrictions and allow failed regenerations to delete the last working website’s artifacts.

7 open issues
What changed in this PR

Extends the Desk reliability foundation from #159 with bounded read-only inspection and explicit website generation, while adding shared, source-checked frontend lessons outside Alexandria.

Changes:

  • Give Answer and Research read-only tools, authenticated protected-directory metadata reads, exact public HTTPS reads, and observation-delivery receipts.
  • Separate manual website builds from course autoplay, retain version previews, and synchronize qualified lessons across local models.
  • Update Desk controls, regression coverage, and operator guidance; record native sensor work as a plan only.
File Description
scripts/​Test-DeskMenu.ps1 Tests omitted-observation notices.
scripts/​Show-DeskMenu.ps1 Updates Ask receipts, mode labels, and sharing guidance.
README.md Clarifies delegated operator judgment for Golden Records.
godbrain_core/​skill_lab/​shared-lessons.test.mjs Tests lesson validation, synchronization, and database isolation.
godbrain_core/​skill_lab/​shared-lessons.mjs Adds shared lesson storage and restoration.
godbrain_core/​skill_lab/​README.md Documents manual builds and shared lesson boundaries.
godbrain_core/​skill_lab/​objectives.mjs Classifies client objectives as marketing-site work.
godbrain_core/​skill_lab/​gym.test.mjs Updates autoplay and tutor-advice regressions.
godbrain_core/​skill_lab/​gym.mjs Integrates lesson synchronization and graduation idling.
godbrain_core/​skill_lab/​gym-core.mjs Separates manual work from autoplay and protects referenced artifacts.
godbrain_core/​skill_lab/​dashboard/​dashboard.js Adds saved previews, regeneration, and database controls.
godbrain_core/​skill_lab/​dashboard/​dashboard.html Presents the manual website builder interface.
godbrain_core/​skill_lab/​dashboard.test.mjs Updates builder and preview tests.
godbrain_core/​skill_lab/​dashboard.mjs Adds builder endpoints and validated preview metadata.
godbrain_core/​skill_lab/​coach.mjs Implements manual regeneration and retires automatic repetition.
godbrain_core/​skill_lab/​builder.test.mjs Covers manual jobs, retention, endpoints, and browser controls.
godbrain_core/​skill_lab/​builder-db.mjs Adds isolated Mongo operations and backend checks.
godbrain_core/​cpp_kernel/​reply_stream_test.cpp Expands read-only tool and evidence regressions.
godbrain_core/​cpp_kernel/​public_web.h Validates public HTTPS targets and response text.
godbrain_core/​cpp_kernel/​protected_read.h Adds isolated directory metadata inspection.
godbrain_core/​cpp_kernel/​main.cpp Integrates read-only loops, authorization, and delivery receipts.
godbrain_core/​cpp_kernel/​local_tools.h Declares read-only mode and protected-read scope.
godbrain_core/​cpp_kernel/​local_tools.cpp Implements gated inspection tools and helper dispatch.
docs/​desk-native-sensors-todo.md Records the sensor investigation plan and boundaries.
docs/​desk-menu.md Documents inspection modes, receipts, and external sharing behavior.
AGENTS.md Adds Golden Record judgment and library-first SRE guidance.

Review effort: Balanced

Comment thread godbrain_core/skill_lab/coach.mjs Resolved
Comment thread godbrain_core/cpp_kernel/main.cpp Resolved
Comment thread godbrain_core/skill_lab/coach.mjs Resolved
Comment thread godbrain_core/skill_lab/gym.mjs Resolved
Require the exact protected target and preserve explicit No tools routing. Attribute batched results to their original evidence rows. Keep passing site versions, reject competing regenerations, run explicit tasks independently of course autoplay, and persist exact source-level lesson invalidations across runs and models. Add focused native, Desk and gym regressions.

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

Copy link
Copy Markdown
Owner Author

All seven independently reproduced review findings are repaired in f9b4bb35050d8e0c758b4123f0da254d9eb25214.

Finding Repair and regression evidence
Protected target widened from CIPolicies\Staged to Active Removed the keyword fallback. Actual executor tests deny both a bare keyword and the wrong explicitly named sibling before helper launch; bearer and allowlist checks remain intact.
Optional Desk Path defeated leading No tools The directive stays first when Path is added. Actual Desk payload tests cover Answer, Research and Fix; the native fixture confirms that payload advertises no tools.
Failed regenerations evicted the last passing website Passing website and alternative versions survive the recent-history cap. A production worker/retention regression performs twelve failed regenerations and verifies both saved sources remain after cleanup. Existing browser tests exercise retained preview links and regeneration.
Batched results falsely reported as omitted Flattening carries each original observation's evidence-row index through aggregation and tests complete-result inclusion in the selected ledger. Actual mock-HTTP tests distinguish two delivered Fix results from a list result replaced by a repo map.
Archived regeneration created a competing project Creation, regeneration and alternative requests share the same active-project guard. Regression verifies rejection before history or objective mutation.
Explicit finite CLI task blocked by course autoplay off The worker receives explicit-task intent, and CLI selection remains on the named task. Finite worker regression executes once with autoplay disabled; automatic-course and host-pause behavior remains gated.
Older shared pass revived invalidated source Persisted local and isolated-gym Mongo invalidations bind task, source hash and exact evaluator version, rather than only run ID. Upload and restore enforce them, legacy stale rows are migrated, and a later same-evaluator pass cannot erase failure during an outage. Tests cover old/new run IDs, local restart, legacy rows and task/evaluator isolation.

Validation

  • scripts\Test-KernelReplies.ps1: PASS, including production compile/link and actual mock-HTTP fixtures in normal and missing-OS-pin variants. GODBRAIN_REPLY_TEST_NO_REGISTRY_WRITES=1 explicitly skipped disposable registry-write fixtures. Existing Keccak/httplib warnings remain.
  • scripts\Test-DeskMenu.ps1 -UiSmoke: PASS, including payload routing and native STA rendering/async UI regressions; synthetic monitor/hotkey controls only.
  • From godbrain_core\skill_lab: node --test builder.test.mjs shared-lessons.test.mjs gym.test.mjs dashboard.test.mjs: 72 passed, 0 failed, 0 skipped, including Playwright builder UI and generated Mongo-script fixtures.
  • git diff --check: PASS.

No live model, protected administrator helper, host registry mutation, deployment or live MongoDB was exercised. The previously documented nine full-gym browser failures also reproduce on unchanged main; this repair did not modify them or rerun that full suite. Source/receipt immutability and Alexandria isolation remain intact.

The PR remains open and unmerged. The original dirty workspace was left untouched.

Repair the shared marketing reference palettes rather than relaxing the protected evaluator. Exercise all themes and negative controls, add an isolated actual-Mongo shared-memory regression, and configure checksum-pinned hosted Windows checks for the full gym, native kernel and Desk. Require real gym storage in CI instead of silently skipping it.

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.

🟡 Changes recommended

Unresolved defects can leave invalid shared lessons usable, resume obsolete course verifiers, and block campaign alternatives or strand them on reused objective keys.

3 open issues
4 previously missed issues

In code that hasn't changed since last review

Medium severity Browser launch failure leaves the dashboard server running

godbrain_core/​skill_lab/​builder.test.mjs:279

Register dashboard cleanup before awaiting browser launch. If chromium.launch rejects, such as when the Chrome fallback is missing, this hook is never installed and the listening server keeps the test process alive instead of letting the suite exit with the failure.

Medium severity Cancelled alternative generations can have their objective keys reused

godbrain_core/​skill_lab/​coach.mjs:210

Retiring automatic generation 3 restores this counter to 2, so the next explicit alternative request reuses generation 3's cancelled objective keys and leaves its variants stuck in qualifying. Allocate the next generation above every generation in the current set and saved history, including cancelled sets, rather than incrementing only the displayed generation.

Medium severity Empty alternatives block requests for regenerated campaigns

godbrain_core/​skill_lab/​coach.mjs:544

After regenerating a campaign that had alternatives, this truthy empty array causes requestCampaignAlternatives() to reject the new website even after it reaches a terminal status. Use campaign.alternatives?.length in both eligibility conditions at lines 570–571, while retaining the existing generation counter so archived objective keys are not reused.

Medium severity Suspended courses resume without validating updated definitions

godbrain_core/​skill_lab/​gym-core.mjs:1103

After a worker restart with updated course definitions, a suspended course resumes here without the startup taskIsCurrent check, allowing its obsolete verifier specification to run under the new evaluator fingerprint. Suspended checkpoints also miss the evaluator-change reset applied to active checkpoints. Apply both startup checks to suspended work before it can resume, preserving valid progress and discarding obsolete definitions.

5 resolved since last review

Review effort: Balanced

…portable

Bound remote invalidation caching to 30 seconds without reuploading unchanged sources. Cover cross-workspace refresh, expired outages, malformed clocks and real Mongo propagation. Use the running PowerShell for the synthetic CLI fixture rather than a host-only installation path.

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

Restoring suspended courses bypasses task validation, allowing obsolete verifier contracts to produce receipts labeled with the current evaluator version.

No open issues 🎉

4 previously missed issues

In code that hasn't changed since last review

High severity Validate suspended tasks before restoring them

godbrain_core/​skill_lab/​gym-core.mjs:1104

A course suspended across a worker upgrade bypasses the startup taskIsCurrent check when restored here. Its obsolete saved verifier contract can then produce receipts labeled with the current evaluator version. Validate the suspended task before restoring it, and reject obsolete definitions as the startup path does.

Medium severity Use shared browser discovery in the new test

godbrain_core/​skill_lab/​builder.test.mjs:276

With GODBRAIN_BROWSER unset, this new test always launches Chrome, while evaluateCandidate discovers Brave or Edge first (browser.mjs:516–530). On a supported Brave-only or Edge-only installation, the existing browser tests can run but npm test now fails here because the hard-coded executable does not exist. Reuse the evaluator's browser-discovery helper so both suites honor the same default and explicit override.

Medium severity Register dashboard cleanup before launching Chromium

godbrain_core/​skill_lab/​builder.test.mjs:279

Please register the dashboard teardown before launching Chromium. If chromium.launch rejects—for example, when the default Chrome executable is absent—this hook is never registered and the dashboard's HTTP listener remains open. The browser test then leaves npm test hanging instead of exiting with the launch failure. Register each resource's cleanup immediately after acquiring it.

Medium severity Check for nonempty alternatives before requesting regeneration

godbrain_core/​skill_lab/​coach.mjs:544

Regenerating a campaign with alternatives leaves a truthy empty array, so requestCampaignAlternatives rejects the regenerated website even after it finishes. Test campaign.alternatives?.length in that function's eligibility check, while retaining the existing generation increment so old objective keys are not reused.

3 resolved since last review

Review effort: Balanced

Autismo and others added 2 commits November 3, 2026 08:14
Preserve terminating errors while making clean-runner-only failures actionable instead of hiding their source location behind the pipeline wrapper.

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

Reuse the startup saved-contract validation when restoring a suspended course. Permit regenerated websites with empty current alternatives to request a new generation without reusing objective keys. Reuse unchanged browser-discovery logic and register dashboard cleanup before browser acquisition. Keep jail-sensitive fixtures under the explicit repository grant; preallocate their paths so cleanup cannot mask the original failure.

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

Copy link
Copy Markdown
Owner Author

The four additional findings in review 5748401724 are fixed: suspended custom courses use the same current-contract gate as startup; regenerated websites can request fresh alternatives while retaining monotonically increasing objective keys; dashboard tests reuse the evaluator browser-discovery helper (export only, no verifier-rule changes), and register teardown before browser launch. Both behavioral regressions failed before the repair; 68 related tests pass, including the actual dashboard with default browser discovery. A missing-browser subprocess now exits explicitly instead of hanging. The remaining hosted failure was reproduced with TEMP outside the jail: fixture cleanup masked its earlier failure. Path-sensitive fixtures now stay inside the repository grant, with no production grant expansion. The exact external-TEMP request regression and normal native STA UI smoke both pass. Fresh hosted gates will determine readiness; not merging a red run.

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 to evaluate a critical administrator-helper path-authorization flaw alongside checkpoint-resume and lesson-state consistency risks.

No open issues 🎉

Review effort: Balanced

@usrname1git
usrname1git merged commit 91e0bb3 into main Nov 3, 2026
2 checks passed
@usrname1git
usrname1git deleted the feat/desk-inspection-builder-lessons-20261101 branch November 3, 2026 07:33
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