You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(daemon): retain sanitized evidence on idle cleanup failure - #4090
Preserve evidence when the daemon idle-reap test fails before its temporary state is removed. Append the existing identity reader's PID/start time, info/lock presence and selected removal/finish phase/reason/code to the original assertion error. Tokens, raw registration/log data and error messages are excluded. Unreadable diagnostics leave the original failure intact.
One test file changed; no new tests, runtime/API changes, budget changes or ownership-fence changes. Refs #4086; part of #4045. This adds observability, not a fix or reproduction claim for the intermittent failures.
Validation
Head: eae13bce45b94dabce7cc2fc200ca8514df9792a.
Frozen install/build, full format and all seven focused entrypoint tests passed.
Disposable fault proof: baseline/restored idle case each passed; forced unproven identity and thrown finish each failed the original assertion with the expected evidence. Token/private-note/error-message sentinels stayed absent. Identical command/default workers; checkout removed and source state preserved.
Independent source review: no findings, no tests run by reviewer.
Full exact-head validation passed tooling, Fallow and unit: 1,849 files / 16,447 passed / one skipped (run-804amS, exactCommit: true). The two original full-suite failures remain unexplained; base unit passed and the phase probe passed eight cases. SDK registration API work is deferred separately until after fix(runtime): preserve platform owner shutdown failures #4063.
The code looks good at eae13bc. The change is test-only, so it touches no runtime route, and all 18 checks pass. I found no conflicts. I read the source and relied on green CI, so I did not run the tests or your fault proof, and the success path was not exercised because the catch only fires on failure. Not blocking: the 30-line catch block in src/daemon-entrypoint.test.ts could move into a small local helper, since it hand-parses the daemon log and duplicates phase names from daemon-startup-diagnostics.ts, and the appended reason and code are not checked against a whitelist (they are typed today); take or leave both. #4086 can stay open until a failing trace is captured, since this PR adds observability only.
Accepted value filtering. The parsed JSON is not runtime-validated, and AppErrorCode deliberately admits arbitrary strings, so its static type does not establish safe diagnostic contents. The follow-up emits only the five current declined-registration reasons and codes from the existing known-code vocabulary. Unexpected strings/objects are omitted; the selected phase remains visible.
Kept the catch inline. It has one caller, and extracting it would retain the same parsing and phase selection while introducing a helper used only once. It makes no new production export or diagnostic-state owner.
Seven entrypoint tests pass. An isolated forced failure retained known values and excluded unexpected string/object sentinels; reverting the filters exposed the three sentinels, and restoration passed. Independent read-only review found no findings. Exact affected validation is waiting for a live shared-lock owner; test(daemon): bound values in idle cleanup evidence #4094 is draft until that result is recorded.
#4086 stays open for an actual intermittent-failure trace. This follow-up makes no diagnosis, SDK API change or budget adjustment.
Follow-up #4094 is now ready for review: all five exact affected checks passed at fb0dc518e3 (run-JnVNMA, exact commit, checkout unchanged), including seven related tests. The previously reported lock wait is complete. This replaces only the pending validation status for the bounded diagnostic-filter follow-up; it makes no claim about #4086's original failure cause.
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
ready-for-humanValid work that needs human implementation, judgment, or maintainer merge
1 participant
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.
Summary
Preserve evidence when the daemon idle-reap test fails before its temporary state is removed. Append the existing identity reader's PID/start time, info/lock presence and selected removal/finish phase/reason/code to the original assertion error. Tokens, raw registration/log data and error messages are excluded. Unreadable diagnostics leave the original failure intact.
One test file changed; no new tests, runtime/API changes, budget changes or ownership-fence changes. Refs #4086; part of #4045. This adds observability, not a fix or reproduction claim for the intermittent failures.
Validation
Head:
eae13bce45b94dabce7cc2fc200ca8514df9792a.run-804amS,exactCommit: true). The two original full-suite failures remain unexplained; base unit passed and the phase probe passed eight cases. SDK registration API work is deferred separately until after fix(runtime): preserve platform owner shutdown failures #4063.