S0001-config-owns-shared-process: term-10 successor, the stderr version line - #74
Merged
Merged
Conversation
…on line The representative change term 10 pins for the version-bump instance test: the successor to 0.0.1 differs from it only in that each of the five delegated verbs writes the single line `cosyte-process <version>` to stderr before its tool is spawned. - src/run.ts writes the line at the one seam before spawnTool, so it precedes the tool's own output. The version is read from this package's own manifest at run time (`<pkg>/package.json`, one level above both `src/` and `dist/`), never inlined, so a later bump cannot strand a stale literal. - `check` prints nothing, stdout is untouched, and no invocation that fails before reaching a tool prints it either. - The e2e guard that pinned "the first published version prints no such line" is flipped to assert the line IS present for all five verbs, is the first thing on stderr, appears exactly once, and never reaches stdout; `check` still asserted to print none. The tool-failure case still asserts no `cosyte-process:` diagnostic rides along, now alongside the expected version line rather than instead of it. - cli.test.ts pins the same behaviour at stream level with the spawn injected, including that the write happens BEFORE the spawn. Nothing else changes: baselines, modifiers, overrides, check and verbatim exit-code propagation are untouched. Spec: work/specs/S0001-config-owns-shared-process/children/config.md (task 8)
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.
The changeset-only follow-up that task 8 of the config slice asks for: the successor to
@cosyte/process@0.0.1differs from it in exactly one behaviour, the line term 10 pins.What changes
Each of the five delegated verbs (
build,test,lint,typecheck,format) writes the single lineto stderr, newline terminated, immediately before the tool is spawned, so it precedes the tool's own output.
checkprints no such line, stdout is never touched, and an invocation that fails before it reaches a tool (bad argv, no package.json, invalid override, unresolvable tool) prints nothing new either.The version is read from this package's own manifest at run time.
src/and the builtdist/sit one level belowpackage.json, so the same relative path answers from source and from the installed tarball, and a later bump cannot strand a stale literal.What deliberately does not change
Term 10 pins the successor as differing from the first published version ONLY in this line, so nothing else rides along: the term-4 baselines and token partition, the term-3 modifiers, the term-7 override semantics,
check, and the verbatim exit-code propagation are all untouched.Tests
test/e2e.test.ts: the guard that pinned "the first published version prints no version line" is flipped. It now asserts, through the real bin in a fixture consumer, that all five delegated verbs put the line first on stderr, exactly once, and never on stdout; thatcheckprints none; and, against the broken-eslint fixture, that eslint's own stderr output comes after ours. The tool-failure case still asserts nocosyte-process:diagnostic rides along, now alongside the expected version line rather than instead of it.test/cli.test.ts: the same behaviour at stream level with the spawn injected, including that the write happens BEFORE the spawn, that the version read is real semver rather than a placeholder, and that a run which never reaches a tool prints nothing.pnpm --dir packages/process run test: 6 files, 136 passing (was 125).pnpm run test:root: 13 files, 216 passing.pnpm run build,typecheck,lint,format:check,check:no-emdash,changeset:guard,pnpm -r publish --dry-run --no-git-checksandnpm pack --dry-runall clean;packages/processfloor suite (node 22.0.0 + pnpm 10.0.0) 6 passing.Release
Carries a
@cosyte/process: patchchangeset (0.0.1->0.0.2, respecting the0.0.xladder in RELEASING.md) and an## [Unreleased]CHANGELOG entry to be promoted by hand in the Version PR.Spec:
work/specs/S0001-config-owns-shared-process/children/config.md, task 8 (AC happy 8, contract term 10).