PLN-352: Characterize telemetry-loop-integration.test.ts drift (Class C — not stale)#124
Merged
Merged
Conversation
…st.ts - Classifies telemetry-loop-integration.test.ts as Class C (not stale) - Documents actual symphony-loop.ts spawn sites (lines 1836, 4349, 4374, 4407, 4446, 4467, 4500) correcting PRD's inaccurate citations (1733, 3697-3830) - Documents telemetry emission sites (lines 2923, 3339, 3409, 4162, 4253, 4517) - Records close-out rationale: all 6 tests pass against current production code, no PTY migration ever existed in the codebase - Confirms zero matches for spawnPtySession/spawnPty/pty.spawn/node-pty Testing: tsx --test apps/desktop/test/telemetry-loop-integration.test.ts passes 6/6 tests; just desktop-lint clean Risks: None identified Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
peterulsteen
added a commit
that referenced
this pull request
Apr 30, 2026
…st.ts (#124) - Classifies telemetry-loop-integration.test.ts as Class C (not stale) - Documents actual symphony-loop.ts spawn sites (lines 1836, 4349, 4374, 4407, 4446, 4467, 4500) correcting PRD's inaccurate citations (1733, 3697-3830) - Documents telemetry emission sites (lines 2923, 3339, 3409, 4162, 4253, 4517) - Records close-out rationale: all 6 tests pass against current production code, no PTY migration ever existed in the codebase - Confirms zero matches for spawnPtySession/spawnPty/pty.spawn/node-pty Testing: tsx --test apps/desktop/test/telemetry-loop-integration.test.ts passes 6/6 tests; just desktop-lint clean Risks: None identified Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
peterulsteen
added a commit
that referenced
this pull request
May 5, 2026
…st.ts (#124) - Classifies telemetry-loop-integration.test.ts as Class C (not stale) - Documents actual symphony-loop.ts spawn sites (lines 1836, 4349, 4374, 4407, 4446, 4467, 4500) correcting PRD's inaccurate citations (1733, 3697-3830) - Documents telemetry emission sites (lines 2923, 3339, 3409, 4162, 4253, 4517) - Records close-out rationale: all 6 tests pass against current production code, no PTY migration ever existed in the codebase - Confirms zero matches for spawnPtySession/spawnPty/pty.spawn/node-pty Testing: tsx --test apps/desktop/test/telemetry-loop-integration.test.ts passes 6/6 tests; just desktop-lint clean Risks: None identified Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
3 tasks
peterulsteen
added a commit
that referenced
this pull request
May 5, 2026
…st.ts (#124) - Classifies telemetry-loop-integration.test.ts as Class C (not stale) - Documents actual symphony-loop.ts spawn sites (lines 1836, 4349, 4374, 4407, 4446, 4467, 4500) correcting PRD's inaccurate citations (1733, 3697-3830) - Documents telemetry emission sites (lines 2923, 3339, 3409, 4162, 4253, 4517) - Records close-out rationale: all 6 tests pass against current production code, no PTY migration ever existed in the codebase - Confirms zero matches for spawnPtySession/spawnPty/pty.spawn/node-pty Testing: tsx --test apps/desktop/test/telemetry-loop-integration.test.ts passes 6/6 tests; just desktop-lint clean Risks: None identified Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Drift Characterization: telemetry-loop-integration.test.ts
Commit SHA at time of analysis:
6c8ac24Classification: Class C — Not Stale
apps/desktop/test/telemetry-loop-integration.test.tsis not stale. All 6 tests pass against current production code without modification. The test correctly exercises the current production spawn and telemetry emission paths.Correction of PRD Line Number Citations
The PRD cited
symphony-loop.tslines 1733 and 3697–3830 as "production spawn sites." These citations are inaccurate:cloneRepoViaGh()/ repo resolution logic — not spawn sites.Actual Production Spawn Sites (symphony-loop.ts)
All spawn calls use Node.js native
child_process.spawn()withstdioarrays. No PTY API is involved anywhere in the codebase.claudeBinary)"pipe"(stdout/stderr streamed)buildClaudePipeline)["ignore", logFd, logFd]buildClaudePipeline)["ignore", logFd, logFd]buildClaudePipeline)["ignore", logFd, logFd]buildClaudePipeline)["ignore", logFd, logFd]buildClaudePipeline)["ignore", logFd, logFd]run-loop.shscript["ignore", logFd, logFd]All pipeline spawn calls are preceded by
getResolvedClaudePath()(fromapps/desktop/src/server/shell-path.ts) which the test exercises viasetShellPathForTest()+process.env.PATHmanipulation.Actual Telemetry Emission Sites (symphony-loop.ts)
job.failedjob.completedjob.completedpreflight.binary_not_foundgetResolvedClaudePath()returns a path that does not existpreflight.spawn_failedopenSync(logFile, "a")throws (e.g. EISDIR)preflight.spawn_failedchild.on("error")fires after spawn (e.g. ENOENT)Why the Test Is Not Stale (Class C Rationale)
Binary resolution path: Tests 1–5 place a fake
claudebinary onPATHand callsetShellPathForTest(). This correctly exercisesgetResolvedClaudePath()(the"path"resolution strategy), which is the same path production uses when no override is configured.Spawn path coverage: Tests 1, 2, and 5 use the
DECOMPOSEcommand which hits the spawn at line 4349. Test 4 (preflight.spawn_failed) uses thePLANcommand which reaches the log-file open at line 4253 before spawning. Both paths remain in production.Telemetry category alignment: The test targets all four current telemetry categories (
job.failed,job.completed,preflight.binary_not_found,preflight.spawn_failed) which are the exact categories emitted by the current production code. No deprecated or renamed categories are asserted.No PTY references: Zero matches for
spawnPtySession,spawnPty,pty.spawn, ornode-ptyinapps/desktop/src/orapps/desktop/test/. The original framing of a "PTY migration" does not correspond to anything in the current codebase. All spawn calls use nativechild_process.spawn()withstdioarrays.Test pass evidence (2026-04-23, commit
6c8ac24):job.failed emitted with correct category/trace/diagnostics on process exit non-zero— PASS (212ms)job.completed emitted with correct category/trace on process exit 0— PASS (158ms)preflight.binary_not_found emitted when claude is absent from PATH— PASS (12ms)preflight.spawn_failed emitted when log file open fails (EISDIR)— PASS (15ms)commandId and operationId from request headers appear in trace context— PASS (138ms)Observability truncates logTail to TELEMETRY_MAX_FIELD_BYTES via TelemetryService— PASS (<1ms)Remediation Approach
Per PRD behavioral details for Class C: "drop the 'stale' label, record the rationale in the PR description, and redirect effort to Feature 2."
No code changes are required. The 'stale' designation is dropped. Effort is redirected to Feature 2 (broader test audit) which can now be correctly scoped given that
telemetry-loop-integration.test.tsis confirmed current.Changes
docs/artifacts/pln-352-drift-characterization.md: Written characterization artifact documenting drift class, cited production line numbers, and close-out rationaleTest plan
tsx --test apps/desktop/test/telemetry-loop-integration.test.ts— 6/6 passjust desktop-lint— cleanspawnPtySession|spawnPty|pty\.spawn|node-pty— 0 matches inapps/desktop/src/andapps/desktop/test/🤖 Generated with Claude Code
Loop ID: 019dbbca-9718-7510-b62b-f181f46e3558
Artifact: https://app.closedloop.ai/implementation-plans/PLN-352