Repository navigation
CI: retain main-process output and measured host logs - #353
Merged
Merged
Conversation
Preserve per-launch stdout/stderr and the stopped host log, exclude credentialed scenes from raw capture, and persist the heavy tool guard’s timing samples. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
artifacts-perf uses a utility host whose output main forwards, and records its samples as JSONL. Keep both alongside the detached host evidence without widening to arbitrary logs. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Capture only the launch-owned replay stub or an explicitly named test-owned synthetic engine. Preserve local-latency diagnostics while excluding c3-stall's installed engine override. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Share the journal export redactor with sitting logs and their console echo, redact bearer credentials, and sanitize CLI failure and raw-process timeout diagnostics. Preserve the 300-character terminal stderr cut after redaction. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Retain 256 KiB of startup plus a 256 KiB rolling tail per stream, with explicit dropped-byte counts. Extract utility-host lines from bounded retained bytes at cleanup without rereading growing files or changing other stream listeners. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Check effective settings after launch preparation and again at cleanup. Fail closed for unknown engines or unreadable settings, removing this launch's captures and leaving a non-sensitive exclusion marker. Bound settings reads and preserve explicitly owned synthetic overrides. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Keep bounded stream heads under a private per-launch profile directory until cleanup rechecks engine provenance. Publish only approved captures and remove staging on either approval or rejection, so worker death cannot bypass the finish backstop through public artifact collection. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Apply the shared public-evidence redactor with launch secrets before writing main streams, utility lines, or host generations to test-results. Bound host reads and discard cut-line fragments so lost credential prefixes cannot bypass redaction. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Match raw and serialized environment secrets longest-first, and redact bearer credentials after escaped whitespace without disturbing JSON syntax. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Refuse both host generations when either existed at capture construction, including after rotation. Preserve the eligible launch's main streams and emit a fixed artifact-compatible host exclusion marker. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Accept only current machine, last-unified, or current-client envelopes with valid engine provenance fields. Require the environment fallback to name the same declared synthetic binary, independently of any deeper product-schema rejection. Keep settings reads bounded. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Keep the same credential-redaction regression without presenting a fixture assignment as an embedded API key to the public-tree scanner. Scanner rules and application behavior are unchanged. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 29, 2026
…est-owned engines and the host log for measured groups, redacted (#353); tracker: process-evidence coverage, the design-systems seed's error-level line, the remote mode row's three halves Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 29, 2026
#353: the measured artifact keeps the hosts' logs) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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 existing red/flaky/requested-evidence upload now has the app's main-process output, and measured uploads retain the engine host's log as well as their samples. Green non-measured jobs still upload nothing new.
What changes
launchMawslaunch retains distinctmain-process-<id>.stdout.logand.stderr.logfiles for its Playwright attempt. Capture attaches as soon as_electron.launchresolves, before waiting for the first window. It adds listeners without replacing the quit specs' or scene hooks' listeners. Relaunches do not overwrite one another. Each stream retains a 256 KiB head plus 256 KiB rolling tail, with the exact dropped-byte count marked; utility extraction works only on those bounded buffers. Raw bytes stay in a mode-0700 per-launch staging directory inside the private profile and are copied into the attempt output only after the final engine-provenance check.supervisor/host.logand its rotated generation after stopping the profile's processes, before deleting its temporary directory, including failed-launch cleanup. These becomeengine-host-<id>.logand.previous.log, each with the same bounded head/tail budget. All promoted streams and host logs pass through the shared public-evidence redactor before any public write. Cut boundary-line fragments are omitted so losing a credential prefix cannot defeat redaction. If either host generation already existed at launch, neither is published: a fixed.host-excluded.logmarker explains the omission. No profile, credentials, lock or journal is copied.artifacts-perfhas no detached log: main forwards its output with[engine-host]. Cleanup extracts just those lines from the already-captured streams into.utility.log; main-only and pty-host lines stay out. Each stream's line order is preserved; this is not a merged timestamped trace.measured-e2e-<slug>now includestest-results/**/*.json,test-results/**/*.jsonl, andtest-results/**/engine-host-*.log. The narrow log pattern avoids uploading the main streams, HTML and screenshots on every green measured job. Upload conditions, successful-checkout guards and seven-day retention are unchanged.artifacts-perfalready wrote JSONL, which the JSON-only path omitted;tool-time-heavy-livewrote no sample file at all. The heavy guard now saves timing-only JSON after every case, including partial/unanswered calls on a failure, without tool arguments, results or journal payloads. It is a scripted Vitest workload, not a paid engine launch.Coverage and limits
The shared built, packaged and alternate-root launch branches are covered when their engine is known test-owned: the helper's generated replay stub or a spec's exact explicitly declared synthetic binary. An inherited/explicit unknown override is not trusted merely because its filename or directory looks like a fixture. The local-latency spec declares the wrapper it writes. Effective Settings
binaryPathis checked after preparation and again at cleanup, including machine/legacy settings precedence; unreadable, malformed, unsupported or oversized settings reject raw retention. The conservative guard recognizes machine v1, unified v20 and client v21 envelopes; older/future formats are excluded rather than duplicating the full nested product schema. The environment fallback must independently name the same known synthetic binary, so a deeper product-parser rejection still cannot select an unknown fallback. A rejected final check leaves only a fixedengine-host-<id>.excluded.logmarker, never the configured path or captured bytes. Initial/final checks do not observe a transient engine switch restored before cleanup; this residual is handled by independently redacting every promoted diagnostic, not by runtime tracking. All measured Playwright groups that launch an engine host go through that helper: artifacts-perf, daemon-idle/baseline/enrolled/aba, local-latency/daemon, dashboard/design/document/presentation scale, document-scale-repeat and presentations-drag. The floor, mawsd-alone and spine-alone groups do not run an engine host. Their existing evidence is unchanged.Paths deliberately left out:
_electron.launchis c12-prerun's explicit owner-store case: the owner's state is not public artifact material.sigusr1.spec.tsuseschild_process.spawnto start the built/packaged main app without Playwright's inspector. Its special stdout-ignore/stderr-assertion path is unchanged, not part of generic capture.ux2-shell,widgets,sessions-available, twosettingscases and onebrowser-cuacase have not yet declared their explicit synthetic-engine opt-in, so capture stays off.sessions.spec.ts's laterbinaryPathchange causes final discard. These are missing diagnostics, not unsafe publication; follow-up can opt each test-owned binary in.Capture begins when Playwright exposes the process; output before
_electron.launchreturns, or from a launch that never returns a process, is not promised. The safety cost of private staging is intentional: worker death or job cancellation beforefinish()promotes nothing, so those runs retain neither main streams nor host output. An ordinary Playwright test timeout still runs fixture teardown and retains its evidence when that cleanup completes.Public-artifact safety
Main logs startup failures as error objects (
src/main/index.ts); the detached host routes console output and stray stdout/stderr to its log, and session failures include upstream error messages. These are not a safe public-log schema for credentialed runs. Rather than claim regex redaction is complete, raw capture is disabled for the workflow's LIVE_E2E, LIVE_GUARD_E2E and MAC_SECRET_E2E lists, with local-run guards for live/prerun/Discover/OAuth scenes and real-engine/owner-profile launch options. The heavy guard's numeric/timestamp/name projection is the deliberate exception: it starts no real engine and exports no payloads.The audit did not establish that a credential has already escaped. It found a pre-existing exposure path in p1-live's stderr sitting notes, which the architect asked to close in this PR. The separate redaction commit shares the journal export redactor with sitting notes and their console echo, adding bearer-token recognition alongside known environment secrets, provider keys and non-fixture emails. Known secrets are matched in raw and JSON-escaped forms, longest-first, and serialized Bearer whitespace is recognized too. The 300-character cut is retained after redaction with the child environment, so truncating an environment credential cannot leak its prefix.
Live stderr/public-output inventory:
e2e/p1-live.spec.ts: terminal-resume stderr →test-results/live-p1/live-s6.txt; now sanitized before truncation and again at the sitting-log boundary.e2e/p1-live-keep-quit.spec.ts: onlyquit-guard:main-process lines are retained through the same sitting logger →test-results/live-s5; now inherits redaction.test/live/maws-ask-interrupt.live.test.ts→test-results/live-s1inherits it too.e2e/plugins-library-live.spec.ts: engine CLI stderr on failure can reach setup notes or the Playwright report through an error; now sanitized at the CLI result boundary.test/live/support/live.ts: raw engine timeout errors can carry collected stderr into test reports; now sanitized with the launch environment. Exported journals andtest/live/maws-tools.live.test.ts's engine stdout already usedredactJournaland now share the enhanced implementation.This does not claim that regexes make arbitrary credentialed main/host logs safe: the new generic capture remains disabled there. The shared redactor closes the existing bounded diagnostic-note/export paths rather than enabling those raw streams.
Verification
8fe0a1dd60db6648a132fa622e1c967c3ab3ea4c: 112 focused Node tests across scripts/e2e-process-evidence.test.mjs, scripts/live-public-evidence.test.mjs and .github/scripts/gate-plan.test.mjs. Real child-process streams prove both outputs survive and an independent stderr listener receives identical bytes. Coverage includes head/tail budgets and cut lines, private staging, fresh/inherited host generations and rotation, effective settings/fallback guards, transient-switch diagnostic redaction, serialized S6/S1 notes, partial timing projections and both upload conditions/file selections.8fe0a1dd6, run 40895385571, with evidence requested. Downloadede2e-transcript: 74 main-process files for 37 launches (79,106 bytes total), 37 host logs (45,646 bytes), zero exclusion markers. Every stderr file includes a real quit-report. A typical host log is 1,231 bytes; stream files range from 177 to 4,483 bytes. The whole compressed artifact is 1,256,651 bytes. An obvious-marker scan found no bearer credentials or sk-ant keys. This verifies the final redaction/staging/provenance path actually retains ordinary hosted launches.CUSTOM_SECRETtest assignment as an embedded API key. Final head431ea2ef89a838453b8367e31ec45b34b5aa5dbconly constructs the same test canary value at runtime; application/capture code and scanner rules are unchanged. Its 18 capture tests pass. Final-head static is green, run 40898134057: typecheck, lint, build and gate-script tests passed. The hosted and measured proofs remain applicable to this test-only adjustment.7267aed43static also passed run 40892176675, before the authorized mini proof below. No full unit suite, paid live suite or heavy-guard measured run is claimed by these focused checks.e2e:local-latency-daemonon7267aed439f3df77e4ba9088f48dd910d244f0ca. It ran on ci-kit-mac-mini from 14:38:25 to 14:41:01Z without--evidence. The only artifact ismeasured-e2e-local-latency-daemon(6,824-byte zip):local-latency.json(66,045 bytes) and an engine-host log (1,357 bytes), no main streams or HTML. The log includesidle: collected in 24 msand16 ms, followed by clean stopAll. The JSON records valid=true, no reasons, 600/600 markers, delta-to-frame p50/p95 24.7/37.1 ms and round-trip p50/p95 1.2/1.6 ms over 200 samples, load 3.645. This group produces JSON rather than JSONL: JSONL inclusion is tested by the workflow tests, not demonstrated by this live artifact. The final safety fixes preserve fresh-profile measured publication while sanitizing it; CI-opt accepted this measured proof without a second mini run.~/.local/share/ci-analysis/window-1029/burst.log) and the run's entries in~/Library/Logs/ci-kit/mac-runner-hooks.log, read over read-only SSH: first settle 14:38:35–14:39:06Z (31 s, initial load 2.91); the build burst reached 4.71–4.96 between 14:39:34 and 14:39:59Z, before the second settle and outside the measurement. Second settle was 14:40:05–14:40:36Z (31 s, released at 3.65). The command window, 14:40:36–14:40:57Z, had 1-minute load readings 3.65, 3.67, 4.18, 4.08 and 4.16 at approximately five-second steps: maximum 4.18, below Rule B's 4.7. A corespotlightd sample at 14:40:10Z showed 126.4% CPU during settling; the measured window still stayed at or below 4.18. The artifact's own validity verdict agrees with this host-side read.Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)