refactor(worker): share the platform browser opener; add the graph artifact dir (issue #54) - #169
Merged
Merged
Conversation
…tifact dir (issue #54) Two enablers for the graph HTML export, behaviour-identical for everything that exists today. The best-effort platform opener moves from github-app-setup.mjs into its own module with an exports-map subpath (./open-browser), because the graph export needs the same spawn and two hand-copies of platform-opener argv is exactly the drift class the mirror tests exist to prevent. The argv table, the detached/ignored/unref posture and the swallow-everything doctrine are unchanged and now pinned literally per platform (the up.mjs exact-argv doctrine); spawn and platform are injectable so nothing launches in tests. github-app-setup's injected openBrowser seam is untouched. defaultGraphDir joins defaultLogsDir/defaultSandboxDir in config.mjs: the worker-owned temp path for the graph artifact, PI_GRAPH_DIR override, and deliberately NOT inside logsDir, whose filename shape is contract (INT-RUN-HISTORY-FILE-CONTRACT). resolvePaths mirrors it as graphDir on the existing pattern. Specs: no entry changes; the artifact itself (and its DES-ADMIN-VIA-PI-EXTENSION amendment) is the next slice, and this refactor changes no behaviour. INT-RUN-HISTORY-FILE-CONTRACT UNCHANGED, checked (nothing new is written into logsDir). DES-GH-APP-MANIFEST-SETUP UNCHANGED, checked (same opener, same doctrine, one module over). Suite in the CI posture: 2108 pass, 0 skipped; admin bundle builds. Signed-off-by: Rob Boerman <robboerman@live.nl>
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.
Fifth slice of issue #54: two enablers for the graph HTML export, behaviour-identical for everything that exists today. Independent of #168 (both branch from main after #167).
What
github-app-setup.mjsintoworker/src/open-browser.mjswith an exports-map subpath (./open-browser): the graph export needs the same spawn, and two hand-copies of platform-opener argv is exactly the drift class the repo's mirror tests exist to prevent. The argv table, the detached/ignored/unref posture and the swallow-everything doctrine are unchanged and now pinned literally per platform (theup.mjsexact-argv doctrine);spawnandplatformare injectable so nothing launches in tests. The wizard's injectedopenBrowserseam is untouched, so its test harness needed no change.defaultGraphDirjoinsdefaultLogsDir/defaultSandboxDirinconfig.mjs: the worker-owned temp path for the graph artifact (${TMPDIR}/pi-dispatch/graph),PI_GRAPH_DIRoverride, and deliberately not insidelogsDir, whose filename shape is contract (INT-RUN-HISTORY-FILE-CONTRACT) — a stray.htmlbeside the sidecars would widen a contract for a file that is not a record.resolvePathsmirrors it asgraphDiron the existing pattern; the workspace-exports probe fixture covers the new subpath.Specs
No entry changes on purpose: this refactor changes no behaviour, and the artifact itself (with its
DES-ADMIN-VIA-PI-EXTENSIONamendment and newREQ) is the next slice.INT-RUN-HISTORY-FILE-CONTRACTUNCHANGED, checked (nothing new is written into logsDir).DES-GH-APP-MANIFEST-SETUPUNCHANGED, checked (same opener, same doctrine, one module over).Tests
Per-platform exact-argv pins, the swallowed sync-failure and inert error-handler cases, unref/error-listener assertions;
defaultGraphDirfallback chain and backslash normalisation;resolvePaths.graphDiroverride/default/empty. Suite in the CI posture: 2108 pass, 0 skipped; admin bundle builds.