Skip to content

Commit 4d20aa7

Browse files
claude[bot]claude
andcommitted
docs(core): say 'declares the same measure', not 'the contract this result implements'
Measured: `packages/core` neither imports nor references `packages/spec/src/kernel/startup-orchestrator.zod.ts`, and nothing in the repo implements `IStartupOrchestrator`. The two `PluginStartupResult` declarations describe the same domain result and share no shape, so 'implements' overstated a relationship that does not exist in code. The reason to take the contract's name is unchanged: it is the name the spec surface declares for this measure. Filed separately as the wider question this made visible. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
1 parent 96e3ddd commit 4d20aa7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.changeset/core-plugin-startup-duration-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Plugin startup elapsed time is now reported as `duration` — the name the spec
66

77
`PluginStartupResult.startTime` (`packages/core/src/plugin-loader.ts`) has always been assigned `Date.now() - startTime`, an elapsed duration, on both the success and the failure path. The name therefore asserts the opposite of the value: a reader who correctly takes `startTime` for an instant and writes `Date.now() - result.startTime` gets an age near the epoch rather than a wait. That is the one failure mode a unit convention cannot rescue — an ambiguous name makes someone stop and check, this one lets them proceed confidently wrong.
88

9-
This is not a naming preference but a divergence between what is declared and what is enforced. `packages/spec/src/kernel/startup-orchestrator.zod.ts` declares `duration: z.number().min(0)` — "Time taken to start the plugin in milliseconds" — for the very result this interface implements, so the contract was already correct and `packages/core` had drifted away from it. The right spelling is also twelve lines above the defect in the same file: `PluginLoadResult.loadTime` carries the identical `Date.now() - startTime` computation under a name that does not lie.
9+
This is not a naming preference but a divergence between what is declared and what is enforced. `packages/spec/src/kernel/startup-orchestrator.zod.ts` declares `duration: z.number().min(0)` — "Time taken to start the plugin in milliseconds" — for the same measure on the same result, the outcome of starting one plugin. The contract surface was already correct and `packages/core` had drifted away from it. The right spelling is also twelve lines above the defect in the same file: `PluginLoadResult.loadTime` carries the identical `Date.now() - startTime` computation under a name that does not lie.
1010

1111
Three sites move, and every one of them is additive — nothing is removed, so no consumer has to change anything on this release:
1212

packages/core/src/plugin-loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ export interface PluginStartupResult {
9494
/**
9595
* Elapsed milliseconds the plugin's `start()` took.
9696
*
97-
* Named for the member the spec contract this result implements already
98-
* declares -- `PluginStartupResultSchema.duration` in
97+
* Named for the member `packages/spec` already declares for the same
98+
* measure -- `PluginStartupResultSchema.duration` in
9999
* `packages/spec/src/kernel/startup-orchestrator.zod.ts` ("Time taken to
100100
* start the plugin in milliseconds") -- and matching `PluginLoadResult.loadTime`
101101
* above: the same `Date.now() - startTime` computation under a name that

0 commit comments

Comments
 (0)