Repository navigation
feat(studio): L04 version summary pass and version.summary event - #1073
Merged
Merged
Conversation
…passes card - server/passes/passModel.ts: callPassModel resolves the provider like the judge (stored keys first), asks for a JSON object, validates it against a zod schema, records model/usage/cost on the PassContext before parsing, and maps failures onto the PassRunner's settle classes. - server/passes/jsonReply.ts: firstJsonObject moved out of judge.ts so the judge and the passes share one implementation. - shared/wireTypes.ts + settingsStore.ts: PassSettings, PassSettingsPatch, PassSpendSummary, PASS_KINDS/PASS_KIND_LABELS and SettingsFile.passes; passes()/setPasses() merge stored values over the haiku-5-5 defaults. - passRoutes.ts + app.ts + index.ts: GET/PUT /settings/passes and the PassRunner's isEnabled hook reading settings.passes().enabled. - runtimeClient.ts + PassesSection.tsx + passes.css: getPassSettings/ savePassSettings/getPassSpend and the screen-variant "Background passes" card (model inputs save on blur, kind switches on toggle, this month's spend table). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Every create/update/publish version write now enqueues a version_summary pass on the workspace PassRunner: the model gets a bounded digest of the saved change (facts for creates, per-field before/after or capped line diffs for updates, requestText when present) and its <=25-word sentence lands on the version via a conditional setSummary, with the deterministic fallback written on every non-ok outcome so the timeline never stays pending. version.summary publishes only when the write wins. Restore and baseline versions are never summarized. VersionStore gains onVersionWritten + setSummary (record and index line rewritten together under withAgentLock); attachVersionSummaries subscribes per workspace inside createWorkspaceContext. The Versions tab's field labels move to shared/specFieldLabels.ts so UI chips and the digest agree. Also drops two stale fallow suppressions (passRunner.enqueue now has a real caller; UNSUPPORTED_PREFIX is consumed by schemaIssues.ts). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Summary
VersionStoregainsonVersionWritten(fires after every successful capture, skipped no-ops excluded) andsetSummary— a conditional write that rewrites the record file and itsindex.jsonlline together underwithAgentLock, so a late second pass never overwrites.server/passes/versionSummary.ts:attachVersionSummariessubscribes per workspace insidecreateWorkspaceContext(L06a's sharedPassRunner, Studio-global secrets/settings). Everycreate/update/publishwrite enqueuesversion_summary(key: agentId:version,timeoutMs: 20_000) throughcallPassModel.buildVersionDigest(≤ 4000 chars): create → one-fact-per-line digest withInstructions:last; update →Label: before → afterblocks, long strings as cappeddiffLinesdiffs (20 changed lines, collapsed context,… N further changed regions not shown), per-block 900-char cap,… N more fields changedtail.fallbackSummary(Changed <labels>./ kind phrases) so the timeline never stays pending;version.summarypublishes only whensetSummarywins. Restore/baseline never summarized.shared/specFieldLabels.ts, now shared by the Versions tab chips and the digest.passRunner.enqueuenow has a real caller;UNSUPPORTED_PREFIXis consumed byschemaIssues.ts).Test plan
versionSummary.test.ts(17): digest shapes/caps, fallback cases, schema clamping, attach flows (ok→summary+event, failed→fallback, restore ignored, unsubscribe), prompt snapshotversionStore.summary.test.ts(7): conditional write, index line, concurrent calls, listener fan-outnpm run test:server— 1403 pass; client suite — 3916 pass; both typechecks cleannpm run fallow— dead code & duplication clean (health count is a local-coverage artifact; CI regenerates coverage)Generated with Devin