Skip to content

fix: complete fork intelligence, client, and release integration - #36

Merged
ScriptedAlchemy merged 10 commits into
mainfrom
audit/fork-integration
Nov 1, 2026
Merged

ScriptedAlchemy merged 10 commits into
mainfrom
audit/fork-integration

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Why

The fork's intelligence, skill-sharing, client, and distribution features had gaps at the boundaries between the UI, durable context delivery, native provider sessions, and installed runtimes. This change traces those paths end to end and fixes reproduced integration failures.

Changes

Intelligence and context delivery

  • Preserve as-sent project-memory evidence when LCM summaries replace their source messages during handoff, including messages outside the bounded history window. Preserve forgetting, source scrubbing, budget limits, and settled-delivery deduplication.
  • Include the actual rendered handoff payload and previously accepted memory attachments in fallback native-context estimates. Scope occupancy to the same project, thread, provider instance, provider thread, and native conversation; deduplicate retries by message and count steering messages separately.
  • Preserve accepted payload size after evidence scrubbing. A retry that suppresses an already-delivered body records zero additional occupancy without replacing the original receipt.
  • Clear stale CodeGraph refresh/failure state after successful checks, using the existing publication event and avoiding unchanged-publication rebuild loops.

Provider integration

  • OpenCode 1 and 2: Check native MCP connection status instead of interpreting registration or reconnect acknowledgements as availability. Retry recoverable registrations, refresh capabilities and credentials, clean up attempted registrations even after lost acknowledgements, and advertise tools only when connected.
  • Cursor: Deliver current intelligence guidance on the first observed send after resume, even when persisted run ordinal is already greater than one.
  • Pi: Await recovery from initial MCP connection failure before the turn; register recovered tools in time for that turn. Reinitialize an expired HTTP MCP session after an explicit 404, without its obsolete session ID, with one bounded retry and shared concurrent recovery. Ambiguous network/server failures do not replay mutating tools.
  • Muse and Claude: Deliver shared guidance in Muse's model-visible turn input and Claude's native-child hook. Restore guidance after supported compaction paths. Preserve explicit native tool restrictions.
  • Native child boundaries: Route intelligence-dependent work through T3 delegation where native child creation omits parent instructions. Keep managed OpenCode processes isolated; external OpenCode servers remain outside T3 MCP injection.
  • Refresh only the known shared-runtime suffix in older Muse replay frames, preserving the recorded request's other protocol assertions. Independently assert Codex's actual native-history payload contains both the handoff context and original messages.

Skills and clients

  • Initialize both actual Antigravity global skill roots for enabled managed instances and observe newly enabled or created instances.
  • Materialize recognized canonical shared-library links into a contained private skill snapshot so the native harness can read them under its realpath policy. Preserve native-root precedence and ordinary live aliases, keep outside links outside the allowed root, remove stale derived files, restore live roots after detach, and serialize concurrent profile preparation.
  • Mount mobile shared-skills controls and linked-environment management in their current settings routes, including permissions, capability checks, visible conflicts/errors, retry, confirmed forgetting, and failed-detach recovery.
  • Keep native mobile updates disabled by default for the fork. Explicitly owned EAS/feed opt-in is reflected in the real iOS and Android native plugin output.

Fork distribution and diagnostics

  • Keep CLI releases, checksums, installers, standalone launchers, pairing/recovery commands, and onboarding links on this fork. Shell and PowerShell installers default to Nightly.
  • Use fork GitHub release metadata for version and database-migration checks without changing the existing RPC contract. Future releases publish the metadata asset; missing older metadata cannot authorize cross-track updates.
  • Reuse an SSH runtime only when its version exactly matches the requested release.
  • Keep triage source checkout, playbook, issue links, and recovery commands on the fork. The fork's nightly tag does not exist upstream, where the old fallback selected unrelated main.
  • Refresh model compatibility policy from the fork and use a repository-scoped disk cache, so a cached upstream manifest cannot override fork policy.
  • Fix the standalone web bootstrap test's real shared-module alias and make the durable delegated-stop regression await its persisted milestone.

No SQL migration or agent-facing Loom tools are added. Loom remains an application feature.

Verification

Verification used the repository's exact Node 26.12.1 runtime with bounded workers.

  • The 118-file audit selection ran 1,280 tests across 54 files, all passing, plus 19 selected React Compiler checks. Formatting, lint, both knip passes, generated GraphQL verification, and the project-memory native build passed.
  • That run exposed test-fixture typing and layer-provision diagnostics. Both fixtures are corrected; all 40 affected-package typechecks then passed using the same package selection as check:changed.
  • The final vp run check:changed 1999b88d1b --concurrency 1 passed on the fixture follow-up: 32 tests across three files, the affected typechecks, formatting, lint, both knip passes, GraphQL verification, and native build.
  • Normal commit hooks passed. The counts above overlap and are not a cumulative test total. No production code changed after the 1,280-test run.

Additional focused evidence, separate from the gate above:

  • Audited all 12 intelligence MCP mounts: seven knowledge tools, three conversation-summary tools, and two CodeGraph/file-history tools. Verified their live service wiring, project/worktree scope, linked-environment capability checks on both ends, credential lifecycle, and HTTP/stdio transport paths.

  • 194 distinct harness tests across seven files, including all eight strict Muse orchestration replays and the touched OpenCode, Cursor, Pi, and Codex paths.

  • 156 tests across five files for the final context-budget changes; earlier real SQLite, CodeGraph worker, and MCP routing/transport coverage also passed. These overlapping suites are not added into a synthetic total.

  • Real SQLite reproduction: ten accepted memory attachments previously disappeared from native occupancy, allowing a 207,542-token policy estimate against a 200,000-token window. The fix counts 141,540 tokens of prior delivered evidence and reduces the next allowance to 8,458.

  • Actual Antigravity 1.4.1 native containment logic: the old shared-library link is denied, the T3-contained snapshot is readable, and an outside link remains denied. Real filesystem tests cover refresh, deletion, detach, and concurrent preparation.

  • Full PDF attachment browser file: 133 tests passed, including the exact CI reload/scroll/zoom case. That isolated failure was not reproduced; no speculative PDF change was made.

  • Real public fork-release discovery, SHA256-verified Linux installer download, installed CLI/version/SSH-helper startup, packaged CodeGraph indexing/query, and released project-memory native-addon smoke checks passed.

  • Eight Claude and six Codex evaluation request dry-runs passed. These validate payloads, schemas, and budgets, not live model behavior.

API/source verification

Inspected the installed or pinned native contracts rather than assuming matching behavior across providers: Codex protocol 687a119f0fcaace47e1f1abcc77cec6c813fd6da; Claude SDK 0.3.276; Cursor SDK 1.0.38; Muse SDK 1.4.6 plus the repository patch; OpenCode SDK/native 1.15.13 and 2.0.28; Pi minimum 0.80.5 and current 1.4.0; generated ACP contracts and actual bundled Antigravity source; Effect 4.0.5 MCP transport and CodeGraph 1.6.2.

Primary references: OpenCode 1 MCP, OpenCode 2 MCP, Claude hooks, Cursor SDK, Pi extension lifecycle, ACP sessions, and MCP HTTP sessions.

Verification boundaries

The required test-t3-app and test-t3-mobile skills need T3 Browser/Device tools unavailable in this session, so native mobile/Electron visual QA and before/after captures were not performed. Existing Chromium component interactions, real filesystem/SQLite/worker tests, native payload checks, and offline eval construction were exercised.

No authenticated live provider turns, signed macOS/Windows installer execution, production SSH hosts, or mobile publishing were used. Native child restrictions remain authoritative. Offline replay does not certify every proprietary native-child or automatic-compaction behavior. Fallback token accounting remains a conservative byte-policy estimate; legacy handoff receipts retain their older raw-item estimate.

The originally locally validated tree was a001e408690711a651b08b45bb35726b2c75933d. A follow-up CI-discovered TypeScript fixture fix adds the required empty manifest.queries array to the Expo Android updates test fixture, preserving the intended native behavior; it is commit ef5fc99. The new head was not locally revalidated; its fresh Fork CI run is pending. Earlier local results above apply to the prior tree and are not proof that this head's complete remote CI passed.

The separately requested Antigravity ACP 1.4.5 upgrade is PR #40, stacked on this PR. It uses the normal native runtime, preserves its capabilities, and passed its required change gate. Merge this integration PR first.

Model: GPT-6 Astra Pro. Harness: ChatGPT with repository shell and GitHub tools.

November 1 main integration follow-up

After #39 merged into main, this PR's original head was fully green but no longer merged cleanly. Merge commit 29fe74c7 incorporates main (3c137fe7) with both parent histories preserved. It combines the independent mobile test inclusions, Codex managed-gh PATH assertions, and Antigravity profile tests; the identical FoundationPersistence correction remains intact. The replay fixture now retains the broader shared-runtime suffix, including the new github_reads block. No validations were disabled or skipped to resolve conflicts.

Fresh validation on the updated head is required: Fork CI run 41288726068 and Agent Context Budget 41288726083 were queued after publication. Earlier passing runs apply only to ef5fc99, not this merge commit.

Current-head CI follow-up — 2026-11-01

On head 29fe74c, Fork CI run 41288726068 passed changed-file checks/build, Linux client/package tests, Rust, and seven server shards. Server shard 7 failed one pre-existing UsageService.test.ts assertion about retained usage after a transcript directory disappears (1,025 passed, 1 failed, 1 skipped). The fixture timestamps its only transcript on August 1, 2026, but the service intentionally drops saved files older than 92 days; the run on November 1 crossed that retention boundary. This is a test-fixture clock dependency, not evidence of a production regression in the fork integration.

Commit 40a610c fixes the existing test by anchoring Effect's TestClock at August 15, 2026, so its retained and expired-window assertions exercise the intended scenario independent of wall-calendar time. The failed behavior was verified against the retention predicate and timestamp arithmetic, and the published patch was inspected. Local focused tests could not execute in this tool environment (no repository checkout and outbound GitHub DNS unavailable). Fresh Fork CI run 41317264082 and other current-head checks are pending, not yet verified green. Earlier CI success cannot authorize merging this new head.

Repair LCM memory handoffs, CodeGraph recovery, harness guidance, mobile settings, shared skill roots, and fork release/bootstrap provenance. Preserve existing client contracts and scope boundaries.

Verified with check:changed: 672 tests, 17 compiler checks, and 40 package typechecks.
@changeset-bot

changeset-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 03bc11d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Validate native MCP status and recovery, resume guidance, skill containment,
and delivered-context occupancy. Keep triage and model policy scoped to the
fork, and repair bootstrap and durable-stop regression fixtures.
Use the complete provider runtime shape and the fixture's concrete workspace.
Provide the independent skills-test services through one merged layer.
Use the official six-platform release and preserve ACP additionalDirectories
through every session activation path. Retain native workflow capabilities.

Validated with Node 26.12.1, the required change gate, real Linux managed
installation, and unmodified native initialization.
Carry forward the Android manifest fixture typecheck fix from the integration branch.
Preserve both sets of changes across mobile test exclusions, Codex native environment tests, and Antigravity profile tests. Keep the replay runtime instruction suffix from the integration branch so dynamic github_reads and other model-visible blocks are refreshed together.
chore(antigravity): update managed ACP runtime to 1.4.5
@ScriptedAlchemy
ScriptedAlchemy merged commit af569b0 into main Nov 1, 2026
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.

1 participant