Repository navigation
test(daemon): bound values in idle cleanup evidence - #4094
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Reproducible fault-proof scope at Command for all four runs, default workers: pnpm exec vitest run --project unit-core src/daemon-entrypoint.test.ts -t 'daemon entrypoint reaps itself when idle'A detached disposable checkout used its own frozen install/build. Baseline: one passed, six filtered. For the failure controls only, append synthetic NDJSON before the existing assertions and make the existing exit assertion expect
The disposable checkout was removed, and the implementation SHA and clean status were unchanged. Independent review inspected the diff and actual diagnostic/type producers, found no findings, and ran no checks. Exact affected result will be recorded separately; no full-unit or native pass is inferred from this bounded proof. |
Size Report
Startup median (7 runs, lower is better):
|
|
Exact affected validation passed at pnpm check:affected --run --base 3c6673a2b960a6607bac1e080f635a133b86c3d3 --head fb0dc518e3927a907492b119bd2a4dd2f117f147All five selected checks passed: format, lint, typecheck, Fallow and related tests (seven passed). Receipt |
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/daemon-entrypoint.test.ts">
<violation number="1" location="src/daemon-entrypoint.test.ts:323">
P3: The declined-reason list is re-typed here as literals, separate from the `removal.state` union in daemon-contracts. If a declined state is added or renamed, this filter silently drops it from the evidence instead of failing. Export a runtime const for the declined states from the owning module and derive this list from it.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| .map(({ phase, data }) => ({ phase, reason: data?.reason, code: data?.error?.code })); | ||
| .map(({ phase, data }) => ({ | ||
| phase, | ||
| reason: ['retained', 'replaced', 'unproven', 'unreadable', 'ownerless'].find( |
There was a problem hiding this comment.
P3: The declined-reason list is re-typed here as literals, separate from the removal.state union in daemon-contracts. If a declined state is added or renamed, this filter silently drops it from the evidence instead of failing. Export a runtime const for the declined states from the owning module and derive this list from it.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/daemon-entrypoint.test.ts, line 323:
<comment>The declined-reason list is re-typed here as literals, separate from the `removal.state` union in daemon-contracts. If a declined state is added or renamed, this filter silently drops it from the evidence instead of failing. Export a runtime const for the declined states from the owning module and derive this list from it.</comment>
<file context>
@@ -309,15 +310,21 @@ test('daemon entrypoint reaps itself when idle: exits cleanly, releases its regi
- .map(({ phase, data }) => ({ phase, reason: data?.reason, code: data?.error?.code }));
+ .map(({ phase, data }) => ({
+ phase,
+ reason: ['retained', 'replaced', 'unproven', 'unreadable', 'ownerless'].find(
+ (reason) => reason === data?.reason,
+ ),
</file context>
|
@apex-sentinel-staging review |
|
Sentinel reviews this repository only for the account that connected the installation, and for logins in |
|
The code looks good at fb0dc51. The checks are green (21 checks, none failing) and there are no conflicts. Not blocking, and you can take or leave it: the five declined states in src/daemon-entrypoint.test.ts:322 are retyped as literals, so a new or renamed state in The open P3 thread on the retyped states still applies: #4094 (comment). I did not run the test or mutate the vocabulary locally. |
Summary
Bound the values appended to an idle-reap assertion failure. Parsed log fields are untrusted: registration reasons now match the five current declined states, and codes match the existing
KNOWN_APP_ERROR_CODESvocabulary. Unknown strings and objects are omitted while the selected phase remains visible.One test file changed. Original assertions, runtime behavior, ownership fences and budgets are unchanged. Follow-up to the optional #4090 review; refs #4086 and #4045. The single-use catch stays local.
Validation
Head:
fb0dc518e3927a907492b119bd2a4dd2f117f147; base:3c6673a2b960a6607bac1e080f635a133b86c3d3.run-JnVNMAhasexactCommit: trueandcheckoutChanged: false. CI coverage/integration remain obligations. This observability follow-up does not diagnose the original intermittent failures.