Skip to content

Integrate local-model workflow and native recovery with closeout evidence - #498

Merged
BunsDev merged 37 commits into
mainfrom
issue-closeout
Nov 12, 2026
Merged

BunsDev merged 37 commits into
mainfrom
issue-closeout

Conversation

@BunsDev

@BunsDev BunsDev commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Local-model workflow and native-recovery changes remained outside main while conversation-fidelity repairs landed. This PR integrates the preserved stacks, repairs packaged cipher selection and the accessible follow-up label, and permits native continuation when Codex persists only its own private current-workspace trust mark. Production local execution remains unadmitted. Companion recovery is independently on main through #497; #496 is closed as superseded after exact-source and regression checks. The latest repair supplies actionable local context-limit errors while retaining failed status, native diagnostic detail and the refusal to retry or switch models.

The trust exception is main-bound to the canonical current workspace and exact private child configuration, with matching effective values, user-layer origin and version. Other user settings, foreign projects, project layers, managed requirements and mismatched provenance remain refused. Captured realpaths are checked before setup and after configuration reads; these are spot checks, not race-free filesystem identity locks. Regression cases failed before the repair; all 45 focused cases now pass, and independent scoped review found no critical or important code finding.

Earlier validation on the frozen trust repair passed root build/typechecks and 2,420 unit tests with 35 explicit skips and zero failures. Full desktop E2E passed 508 cases with 11 explicit skips; site E2E passed seven, with zero failures or observed retries. The unchanged 500 ms cold-open gate measured 73.2 ms. Four opt-in real-model Electron lifecycle cases separately passed with zero skips/retries, covering read/edit/independent-check/rendered-diff, Stop/restart and owned Codex/server loss; this disposable bootstrap is not normal product admission or offline/human acceptance. The unchanged Swift source retains its separately recorded 65-unit pass and two distinct fresh-install paired suites, each with 43 ordinary passes, one intentional expected failure and no actual failures/skips. The test-only shutdown sampler and DEBUG-only paired TLS observer preserve close outcomes, certificate APIs, exact pins, redirects and deadlines; prior native observations and their limitations remain in the delivery receipt. Final validation on the latest overflow repair passed build/typechecks and 2,435 unit tests with 36 explicit skips and zero failures/cancellations. Four installed-Codex/scripted-server failure cases separately passed with no skips, each recording exactly two requests, one selected model and one synthetic command effect. The first final unit run failed Vite ephemeral-port selection; its raw failure, direct bind control, wrongly scoped diagnostic setup failures and correctly scoped four-case pass are retained. One explicit unchanged full revalidation passed; this does not establish a port fix or root cause.

The prior hosted-qualified candidate is aa095b29ff310bd837cdf6aac6af9389c122e9af. Its three follow-up commits retain bounded Electron main-process exception/stderr diagnostics, keep signed Noble sources through baseline and upgrade Debian dependency installation, and narrow iOS trust polling to Companion phase/Security records and trustd peer records. Production application and Swift inputs are unchanged by these three follow-ups. The Debian wrapper preserves the original 180,000 ms direct-command deadline; all four Noble pockets, the Ubuntu keyring, strict acquisition checks, nine host packages and installed acceptance checks remain. That deadline does not prove atomic termination of APT descendants. Final source-frozen build/typechecks and units passed with 2,465 passes, 36 explicit skips, zero failures and zero cancellations. Focused validation passed 13 real-shell/Node-wrapper cases, 19 trust-observer cases, five real-child Electron diagnostic controls, all eight Code Review accessibility cases and one manually emitted monitor-event control inside owned Electron. The latter proves diagnostic wiring, not an actual uncaught exception or native-modal reproduction. Independent final source/documentation reviews found no remaining Critical or Important finding; the Electron cleanup-branch coverage limitation is recorded.

The passing 188af74 iPhone run separately retained six stack-observer poll errors, last classified OUTPUT_LIMIT, followed by a timed-out command with unconfirmed closure. The common gate stopped further launches; no callbacks or stacks were captured, so the app test pass does not qualify live stack collection. The new predicate preserves all output/command/identity/cleanup bounds. A native Foundation predicate control using 11,049 retained OS records plus 2,001 synthetic unrelated records failed the unchanged 512 KiB limit with the old query and selected 21 records totaling 26,234 bytes with the new query. Actual parser replay preserved the app/thread/activity/trustd correlation using synthetic identity/sample adapters. Process names in that control are explicitly derived from retained image paths. This proves predicate syntax and event selection, not a live simulator query, stack capture, the earlier overflow/timeout cause or simulator-side descendant cleanup. Complete diagnostic archives remain separate from the narrow polling channel.

A network-denied native qualification with Codex 0.167.0/Ollama 0.40.16 and the approved qwen3-coder:30b digest completed nine turns, native compaction and a following verified fixture read. All 28 Responses requests returned HTTP 200; actual loaded context was 65,536, personal configuration and fixture bytes were unchanged, and owned processes stopped. Independent session audit nevertheless found 18 tool calls against 16 intended: two completed reads were issued again after compaction. This establishes continuation, not action-safe compaction, exactly-once tools or an overflow root cause. The earlier dense-user-message overflow and below-threshold attempt remain retained failures. The open compaction-safety finding and product-admission gates remain unresolved. A separate complete transport capture reproduced dense overflow after compaction: the request retained three old dense inputs plus the fourth new input and was rejected at 73,800 tokens against the verified 65,536-token slot. The original 73,649-token failure remains separate; the installed compactor estimation algorithm and exact token contributions are unproven. Another observed counter run matched all 18 intended calls with one effect, but that passing observation does not repair the earlier duplicate proposals. The diagnostic repair does not qualify reliable compaction or normal product admission.

Other retained evidence includes actual tokenless runtime metadata reads through the three approved routes, the real Save task record/reopen token-exclusion regression, bounded IPC/memory observations, and 33 restored original CF-8 captures with their historical provenance. Runtime-advertised context remains distinct from actual loaded context. These receipts establish no lower-memory guarantee, packaged Keychain acceptance, human accessibility, physical-device acceptance or live Code Review write acceptance. Earlier TLS/shutdown failures remain unexplained despite successful hosted checks on the old published head.

Retained parent fc593e0 failed the Settings click before Jev-theme contrast measurement, then timed out in teardown and reached the 45-minute job limit. Its Electron main-thread sample is inside NSAlert runModal; the dialog message and cause remain unknown. Parent 188af74 subsequently passed required macOS qualification with 511 desktop E2E passes and eight skips, seven site passes, paired iPhone qualification with 44 tests and zero actual failures, and Windows qualification. That successful observation does not explain the earlier modal or trust stalls. Linux acquired all four signed Noble pockets and 114 host packages, then failed its first Debian install because libnotify4 was not installable. The later installer used default APT sources after the preparation-only configuration ended; the new wrapper tests consistent source use through dependency installation, while the failed runner's actual APT policy/cache state and real installed acceptance remain unproven. All four jobs on aa095b2 subsequently completed successfully: required macOS qualification (511 desktop E2E passes, eight skips, seven site passes), 44 iPhone test executions with zero actual failures, and Windows/Linux platform qualification. The jobs tested synthetic merge a964ae45fcef154a8c5af933e3bcb79bbe09c0bf, whose parents are main 85143ee and branch aa095b2; its tree exactly matches the branch tree 9a5d53a79e6bac51a04c815571d5dcdc60826911. Linux exercised eight installed launches with libsecret, refusal of basic_text credential writes, and controlled KWallet5 restart persistence; Windows exercised three NSIS launches and DPAPI persistence. Both original installer receipts still explicitly report installer acceptance pending. Synthetic baseline version 0.0.0 is not historical-schema migration, CLI version probes are not authenticated coding turns, and controlled KWallet5 is not KWallet6 or full graphical-login acceptance. The iPhone observer reported zero outer poll errors but nine app-image refusal entries and zero bound observers or captured stacks. Offline diagnostics contain five distinct callbacks with normal chain-return, accept-pin and completion-return phases; repeated refusal entries are not distinct callbacks. Neither a live stack binding nor the earlier trust-stall cause is established.

Fresh whole-branch review found an Important draft-selection privacy race on the otherwise green aa095b2 head: while local thread creation waited, its source draft could accept a send through the previous non-local configuration. The signed and published privacy repair is 68dae3500976a11ae2411d2af15d7866be89104d, tree f387aa76e3abfda9d234bbc469164db0823eccf6. Two controlled Electron regressions failed before repair; final dispatch was intercepted before any real provider ran. The repair reserves and fences only the source and prospective target, preserves the exact raw draft, and leaves unrelated Stop and editing available. All three focused cases and full source-frozen build/typechecks passed. Units passed 2,465 with 36 explicit skips, zero failures and zero cancellations; desktop E2E passed 511 with 11 explicit skips in 19.3 minutes, and all seven site cases passed. No failure or retry marker was observed, and all four frozen implementation/test hashes match the committed blobs. Independent incremental source review and final documentation review found no new findings within their recorded scope. The refreshed LM-7 map preserves the historical November 3 snapshot and separates current candidate/native evidence from unqualified compaction, runtime, human and admission gates. Its CI run 43094423044 and native-platform run 43094423081 subsequently completed with failure. The retained original logs show five artifact-upload errors: the CreateArtifact/FinalizeArtifact boundary received HTML where JSON was expected after five attempts. This identifies the response-format failure, not a service-wide outage, permission failure or application defect. macOS build and units succeeded but Electron/browser/site E2E were skipped after coverage upload failed; Windows installed-app/DPAPI checks were skipped after baseline upload failed. The iPhone log records 44 test executions with zero actual failures; Linux completed its installed exercise with installer acceptance still pending, but result uploads failed. Original failed retrievals are retained; after terminal-state recovery, all four job logs and a valid small control ZIP were successfully downloaded. These runs are not hosted qualification passes.

The current signed and published head is 7d2d6c89de5a262d08876777a907568acd4a4405, tree 2bd27e068003bc7306645f56dab368ab66399594. Commit 4809a0b preserves bounded app-image refusal stages instead of losing them in a generic catch; the existing exact image, process, device, boot, command-close, output and deadline gates remain. Six new baseline controls failed; all 25 focused cases and full build/typechecks passed, with 2,471 unit passes, 36 explicit skips, zero failures and zero cancellations. Independent scoped source and final documentation reviews found no findings. A read-only native container-query control classified a closed command failure; it did not bind an observer, capture stacks or repair TLS. Application and E2E inputs are unchanged from 68dae35, so its 511 desktop passes, 11 skips and seven site passes are explicitly reused local evidence, not a fresh whole-candidate E2E run. Commit 7d2d6c8 documents one historical cold/warm native observation from 7d6094e: first read 14,194 ms, following edit/test 3,761 ms, total workflow 18,126 ms, with one 9.06-second runner start. Different tasks and uncontrolled caches prevent a speedup or current-head performance claim; no new inference was run to derive these timings.

Fresh CI run 43107289451 completed successfully on the current head. Its original macOS log records 2,471 unit passes with 36 explicit skips and zero failures, 514 desktop E2E passes with eight skips in 34.2 minutes, and seven site passes in 18.8 seconds. Desktop results, runner memory and coverage ZIPs are retained with matching GitHub SHA256 digests and valid ZIP integrity. The iPhone job completed successfully; its original log records two suites of 24 and 20 tests, 44 executions total, with zero actual failures and TEST EXECUTE SUCCEEDED. Its 87,634,980-byte result ZIP is retained, matches the GitHub SHA256 digest, and passes ZIP integrity checks. The stack observer stopped at its initial booted-device-list command after a timeout with unconfirmed closure; the common gate prevented further launches. No app-image binding, captured stack, prior-stall cause, TLS repair or physical-device acceptance is established by that app-test pass. Native-platform run 43107289525, CodeQL and code-quality checks have completed successfully. Both native platform jobs exercised their installed candidates. Seven small native archives are retained with matching GitHub SHA256 digests and valid ZIP integrity; their receipts identify tested merge 5fcb8eed416969a735c7a3fc03be5b7127405f15, whose parents are main 85143ee and current branch 7d2d6c8 and whose tree exactly matches the branch. Linux records eight installed launches and Windows three; both explicitly retain installer acceptance pending. These observations do not establish historical-schema migration, authenticated provider-account acceptance, KWallet6, full graphical-login acceptance or product admission. All exact-head hosted checks, including the subsequent coverage upload, completed successfully. Final independent incremental review found no Critical, Important or Minor findings and verified the six changed-file bindings, original logs, retained archive hashes, tested merge/tree identity and signature receipts. The passing observation does not explain earlier modal, trust or artifact-service failures. Protected delivery remains pending.

No issue closure, feature activation, release, tag, TestFlight upload, installed-app replacement or other-owner cleanup is included. Exact-head hosted checks are verified; protected delivery is still required; #475 reconciliation waits for replacement scope on main. Evidence: private workspace continuation and limits, prior integration, and native delivery. Current evidence: actionable overflow repair and qualification limits. Earlier diagnostic delivery evidence: Electron modal observation, Debian signed-source continuity, and bounded iOS predicate experiment. Latest repair evidence: local destination fence and final validation and current LM-7 evidence reconciliation. New evidence: bounded image-binding diagnostics and historical native timing scope.

@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Nov 11, 2026 9:55pm UTC

Request Review

@github-code-quality

github-code-quality Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main 85143ee issue-closeout 7d2d6c8 +/-
66% 66% 0%
View coverage of the 10 most impacted files.
File main 85143ee issue-closeout 7d2d6c8 +/-
apps/desktop/sr...ngine/runner.ts 98% 98% 0%
apps/desktop/sr...ckends/codex.ts 97% 97% 0%
apps/desktop/sr...ls/execution.ts 100% 100% 0%
apps/desktop/sr...ative-drafts.ts 99% 99% 0%
apps/desktop/sr.../routing/fit.ts 98% 99% +1%
apps/desktop/sr...dels/service.ts 95% 96% +1%
apps/desktop/sr...dacting-sink.ts 0% 81% +81%
apps/desktop/sr...-model-store.ts 0% 88% +88%
apps/desktop/sr...message-copy.ts 0% 100% +100%
apps/desktop/sr...tion-binding.ts 0% 100% +100%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 11, 2026 22:35 UTC

@BunsDev

BunsDev commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Current-head qualification and first failures are retained separately. On published head 0b77a13739550d3b83f3726738bf001bede7ce2e, the required macOS check passed with 511 desktop passes, eight skips and seven site passes; Linux and Windows also passed. The iPhone job failed with 41 ordinary passes, one intentional expected failure, one actual failure and no skips across 43 executions. The failing assertion was “Pairing must survive relaunch without scanning again.”

The hosted recording shows the saved Workspace still present and “Connecting to your Mac…”, rather than the unpaired welcome screen. CFNetwork diagnostics show TCP connected, then external TLS trust evaluation requested, followed about 78 seconds later by timeout -1001 without HTTP bytes. This locates the observed stage; it does not prove credential loss or that the application's certificate-chain extraction was entered or blocked. Certificate pinning, redirects, timeouts and trust APIs remain unchanged. A manual matching-pin native control passed and did not reproduce the stall.

An independent fresh-install local run on iPhone 17 Pro simulator, iOS 27.2, completed with the same 41/1/1/0 counts. Its pairing and relaunch succeeded; its distinct failure was secure-question submission. This differs from hosted iOS 26.4.1 and does not clear that failure. Both finalized xcresults, logs and the hosted artifact digest are retained externally; raw diagnostic bundles remain private.

Signed local commit 19d418d adds bounded test-only native stack sampling when the original Electron close remains pending, with no app kill, retry, timeout extension or changed outcome. Five focused units, ten affected Electron cases, a real sampler control and the root build/unit command passed (2,412 unit passes, 35 skips). This is observation support, not an established shutdown repair. Published Companion recovery head d3d2eee is now integrated locally in signed merge e068ef1, including its keyboard Done handling and independent project-context regression; a fresh-install paired qualification is running on that integration. Neither local increment is pushed or on main yet. No issue, security gate, human/device acceptance or product activation is claimed complete.

@BunsDev

BunsDev commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Fresh iPhone qualification on da13074cb764264df47e22ddc4ca732247d9ced9 failed: job 130643135114 executed 44 paired/demo tests and failed testPairApproveAndFollowUpThroughTheMac at initial pairing (CompanionFlowTests.swift:368), before the expected Mac thread appeared. This is a different trigger from the earlier post-relaunch failure. The immutable 73 MB result artifact, raw job log and annotations are retained; no unchanged rerun was requested.

The archived app logs contain callback-enter and chain-start, followed by SecTrustEvaluateIfNecessary and an accepted trustd XPC connection under the same activity. The snapshot request timed out roughly 76 seconds later with no HTTP request/response bytes. No chain-return, pin decision or callback completion phase is retained. Later trustd/securityd entitlement/certificate messages occur after timeout and test failure; they do not establish the initial cause. No pin mismatch, DNS cause or permanent deadlock is inferred. A bounded app/trustd stack capture during the silent interval is the next causal experiment; current trust APIs, pins, redirects and deadlines remain unchanged. macOS qualification is still running; Windows passed, while Linux remains failed on package-host DNS.

assert.ifError(result.error);assert.equal(result.status,17,result.stderr);const events=fs.readFileSync(trace,'utf8').trim().split('\n').map(x=>JSON.parse(x));
const roles=expectObserver?['fixture','observer']:['fixture'];assert.deepEqual(events.filter(x=>x.event==='start').map(x=>x.role).sort(),roles);
assert.deepEqual(events.filter(x=>x.event==='stop').map(x=>x.role).sort(),roles);
const observer=events.find(x=>x.role==='observer');if(expectObserver){assert.deepEqual(observer.args.slice(0,2),['--device',device]);assert.equal(events.filter(x=>x.role==='observer'&&x.event==='start').length,1)}else assert.equal(observer,undefined);
@BunsDev

BunsDev commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Additional acceptance audit while the protected queue tests exact head 7d2d6c89de5a262d08876777a907568acd4a4405: #378/#381 still have an observable manual-model visibility gap. An actual compiled-service-to-renderer reproduction returned an explicitly entered ID from main after a synthetic loopback metadata HTTP 503, but entryModels discarded it because discovery was unavailable. The reproduction exercises model visibility; production coding execution remains unadmitted. The queued source is unchanged and neither issue is ready for closure from this integration alone.

A private corrective candidate is prepared for the follow-up: preserve descriptors actually returned by main on runtime failure, and clear cached descriptors when the IPC call itself fails. A negative control reproduced the initial proposal's cached-model exposure after IPC rejection; the revised candidate passes eight focused cases, including unreadable-credential/zero-request refusal, plus both complete renderer and main TypeScript programs through a no-emit source overlay. This proposed fix has not been applied to the queued tree or delivered on main.

Three additional cases now pass through actual Electron preload/main/IPC for empty metadata, malformed metadata and a delayed answer followed by a revision-changing switch between two owned endpoints, with zero retries or skips. The initial delayed fixture incorrectly expected a label-only edit to change execution revision; the corrected stimulus changes the endpoint without relaxing assertions or deadlines. First textual failure logs and a separate unintended repeat are retained; the repeat overwrote the original first trace, which is not used as acceptance evidence. The corrected three-case result has separate artifacts. These private regression inputs still need canonical delivery in the follow-up; full producer criteria, packaged Keychain, admission and human/device gates remain open.

This branch was successfully deployed

1 active deployment
Preview — 7d2d6c89 Deployed Nov 11, 2026 by vercel[bot]
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