Repository navigation
Conversation
… of plain text (#378) Failing-first regressions, each confirmed against 954cd5b before the fix: - An unreadable, wrongly shaped or newer-version local-connections.json read as empty and the next save replaced it, losing every profile and tombstone (AC6 history). Only a missing file reads as empty now; list and every edit throw a fixed message and leave the file byte-for-byte, and resolve/provenance return null. Entries this build can't validate are written back exactly as found and are never listed or resolved. - A saved token pasted into the label or a manual model ID was written to the plain-text profiles file and returned in views (AC3). Create and update refuse it, including when a new token is already inside a saved name or ID. An address change still drops the token, so nothing saved can repeat it. - Token entries left by a crash between saving a token and its profile, or by a failed clear on delete, stayed in secrets.json. After every successful save, local_connection entries no profile (live or foreign) names are removed; other secrets are never touched. SecretStore gains names(), which lists entry names only. - resolve() reports credentialUnavailable when a saved token can't be decrypted, for discovery to act on in the next commit. The token-reflection fixture no longer saves a manual ID holding the token, since that is now refused at save time. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…adline per discovery (#378) Failing-first regressions, each confirmed against 954cd5b before the fix: - When a profile's saved token couldn't be decrypted (keychain locked or unavailable), discovery sent the metadata reads without it and could report "ready" from an unauthenticated answer. It now returns "unavailable" with the new fixed reason credential-unavailable, keeps manual IDs, and makes zero requests (AC3, AC1). - Each read had a deadline but a whole discovery did not: 32 Ollama /api/show reads just under the per-request deadline, four at a time, held the answer for ~7.2 s at a 1 s deadline (~40 s at the default). A discovery now ends within three per-request deadlines: listings use at most two, and per-model reads share what remains. Detail still unread at the deadline stays "unknown", not a failure; a real cancel or supersede still returns stale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ngs (#378) Regression coverage only; both passed on first run against 954cd5b, so neither found a defect. - Through LocalModelsService (the path local-models:command takes), a slow read is stale after a label-only, manual-IDs-only, address or token edit, and after deletion; an untouched profile still reads. The existing stale test drove the store and invalidate() directly. - Endpoint policy: octal and trailing-dot IPv4 and fullwidth "localhost" normalize to loopback origins; IPv4-compatible, NAT64 and other embeddings of 127.0.0.1, "localhost." and port 65536 are refused. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Receipt section "Hardening, 2026-10-24": each defect, the failing assertion it began with on 954cd5b, the regression-only coverage that found nothing, request counts, and exact command results on b12483c. Status names the hardening on lm2-integrate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code coverage overviewLanguages: TypeScript TypeScript / code-coverage-agent
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
This was referenced Oct 24, 2026
BunsDev
marked this pull request as ready for review
October 24, 2026 09:00
BunsDev
added a commit
that referenced
this pull request
Oct 24, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
This was referenced Oct 24, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LM-2 for #378 under #376: hardening on top of #398. Gate A was accepted on #377 on 2026-10-24. Do not merge yet: this lands after #398, and only with Val's go-ahead. Native metadata evidence is still open.
Stacked on
lm2-fixes(#398) at954cd5b, which this PR does not change.lm2-fixesandlm2-discoverybelong to other sessions, so this is a separate branch from a separate worktree (lm2-integrate). When #398 lands, GitHub retargets this PR tomain; it will then need a rebase onto the squash.Fixes (each began with a regression that failed on
954cd5b)local-connections.jsonthat couldn't be parsed, had the wrong shape or declared a newerversionread as empty, and the next save replaced it, losing every profile and tombstone. Only a missing file reads as empty now.listand every edit refuse with a fixed message and leave the file byte-for-byte, and nothing resolves through it. Entries this build can't validate are written back exactly as found and are never listed or resolved.secrets.json. Every successful save now removeslocal_connection:entries no profile names. Other secrets are never touched.ready. It now returnsunavailable/credential-unavailable, keeps manual IDs and makes zero requests./api/showreads held the answer for 7.2 s at a 1 s deadline (about 40 s at the default). Discovery now ends within three per-request deadlines, and unread per-model detail staysunknown.Regression-only, no defect found: stale answers through
LocalModelsServiceafter label-only, manual-only, address and token edits and after deletion; more IPv4/IPv6/IDN endpoint spellings.Not in this PR
ConnectionRef/schema-1LocalModelReffromshared/local-models.ts,LocalMetadataRuntimemapping,advertisedkeyed byCapability). That is draft LM-2: main-owned local connections and bounded model discovery (#378) #403, stacked on this PR; it merges LM-1's Finish LM-1 identity reconciliation and reproducible probe handoff (#377) #400.Checks
On
b12483c(code;a5da829adds docs only), base954cd5b,mainat70123b9. macOS 27.0.1 arm64, Node v24.22.0, pnpm 10.34.5, Electron 44.4.5, Playwright 1.63.0.local-model-*tests: 32/32 passed. Each of the three code commits also passed on its own (29, 31 and 32 tests).pnpm build && pnpm test: exit 0. Worktree 117/117, core 16/16, desktop 1884 tests (1868 passed, 16 skipped, 0 failed), native 21/21, site 10/10, Store 16/16.pnpm typecheck: exit 0.e2e/local-models-ipc.spec.ts: 1/1 passed. There is no renderer change, so the full e2e suite was not run.PR CI on
a5da829passed every job:unit + e2e (macOS)(required), iPhone companion, CLI and installers on win32 and Linux, and the TypeScript coverage upload.Every commit is SSH-signed. Details:
docs/reviews/2026-10-22-lm2-connections-discovery.md#hardening-2026-10-24.🤖 Generated with Claude Code