Skip to content

Commit f37e64c

Browse files
ualtinokAlfonso
andcommitted
style: biome formatting for #347 schema describe + #330 test (local-pinned 2.5.1)
Co-Authored-By: Alfonso <[email protected]>
1 parent 4ce33d7 commit f37e64c

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

‎packages/plugin/src/config/schema/magic-context.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ export const MagicContextConfigSchema = z
709709
.union([z.string(), z.object({ default: z.string() }).catchall(z.string())])
710710
.default("5m")
711711
.describe(
712-
'How long Magic Context assumes the provider\'s cached prefix stays valid. This is MC\'s own deferral gate — it does not change the provider\'s actual cache lifetime. String (e.g. "5m", "1h", "30s") or per-model object ({ default: "5m", "model-id": "10m" }). Set to "never" to mean MC never assumes expiry (for lanes kept warm externally by a cache-keep tool) — disables the idle-TTL heuristic so MC never initiates a rebuild based on elapsed time. Provider-side extended TTL is a separate request-level concern (cache_control: { ttl } in the request body).'
712+
'How long Magic Context assumes the provider\'s cached prefix stays valid. This is MC\'s own deferral gate — it does not change the provider\'s actual cache lifetime. String (e.g. "5m", "1h", "30s") or per-model object ({ default: "5m", "model-id": "10m" }). Set to "never" to mean MC never assumes expiry (for lanes kept warm externally by a cache-keep tool) — disables the idle-TTL heuristic so MC never initiates a rebuild based on elapsed time. Provider-side extended TTL is a separate request-level concern (cache_control: { ttl } in the request body).',
713713
),
714714
prompt_surface: PromptSurfaceConfigSchema.default({ default: "full" }).describe(
715715
"Prompt-surface presets: default is full; models use bare model IDs, provider/model, or provider/* routing keys. Guidance and tool-description overrides are user-level only. On OpenCode and Pi, per-model routing applies to the guidance block only: tool descriptions are registered once per process, so they follow the default preset (a v1 plugin-surface limitation; per-model tool descriptions are planned for the OpenCode v2 plugin API once the SDK stabilizes).",

‎packages/plugin/src/features/magic-context/storage-embedding-measurements.test.ts‎

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,28 +69,32 @@ describe("embedding measurement corpus", () => {
6969
const overflow = 5;
7070
const total = cap + overflow;
7171
for (let i = 0; i < total; i++) {
72-
recordEmbeddingMeasurement(db, {
73-
sessionId: "ses-cap",
74-
projectPath: "/repo",
75-
// Unique query text per row: dedup is on (query hash, cohort), so
76-
// distinct queries simulate the cohort-transition growth.
77-
queryText: `query ${i}`,
78-
cohortKey: "fp-a:0|fp-b:0",
79-
primaryResultIds: [],
80-
shadowResultIds: [],
81-
primaryLatencyMs: 1,
82-
shadowLatencyMs: 1,
83-
primaryFailed: false,
84-
shadowFailed: false,
85-
primaryModelId: "local-id",
86-
shadowModelId: "synapse-id",
87-
primaryFingerprint: "",
88-
shadowFingerprint: "fp-b",
89-
primaryEpoch: 0,
90-
shadowEpoch: 0,
91-
corpusHash: `corpus-${i}`,
92-
coverage: {},
93-
}, cap);
72+
recordEmbeddingMeasurement(
73+
db,
74+
{
75+
sessionId: "ses-cap",
76+
projectPath: "/repo",
77+
// Unique query text per row: dedup is on (query hash, cohort), so
78+
// distinct queries simulate the cohort-transition growth.
79+
queryText: `query ${i}`,
80+
cohortKey: "fp-a:0|fp-b:0",
81+
primaryResultIds: [],
82+
shadowResultIds: [],
83+
primaryLatencyMs: 1,
84+
shadowLatencyMs: 1,
85+
primaryFailed: false,
86+
shadowFailed: false,
87+
primaryModelId: "local-id",
88+
shadowModelId: "synapse-id",
89+
primaryFingerprint: "",
90+
shadowFingerprint: "fp-b",
91+
primaryEpoch: 0,
92+
shadowEpoch: 0,
93+
corpusHash: `corpus-${i}`,
94+
coverage: {},
95+
},
96+
cap,
97+
);
9498
}
9599

96100
const rows = listEmbeddingMeasurements(db, "ses-cap");

0 commit comments

Comments
 (0)