Repository navigation
Conversation
|
Codex implemented the logging changes and tests described above. Gabe reviewed this PR. CI is green; hosted validation remains pending. Devin review is settled with no open findings. — Codex |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## gwdp/serve-sim-server-log-forwarding #4883 +/- ##
=======================================================================
Coverage ? 77.52%
=======================================================================
Files ? 1135
Lines ? 57778
Branches ? 12830
=======================================================================
Hits ? 44784
Misses ? 12873
Partials ? 121 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ent-device-daemon-logs
…ent-device-daemon-logs # Conflicts: # packages/build-tools/src/steps/utils/__tests__/warmIosSession.test.ts # packages/build-tools/src/steps/utils/warmIosSession.ts
…ent-device-daemon-logs
…ent-device-daemon-logs # Conflicts: # packages/build-tools/src/steps/utils/__tests__/warmIosSession.test.ts
…ent-device-daemon-logs # Conflicts: # packages/build-tools/src/steps/utils/warmIosSession.ts
…ent-device-daemon-logs
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
szdziedzic
left a comment
There was a problem hiding this comment.
Requesting changes on #4883:
- The new daemon log reader inherits the
/usr/bin/tail -n 0 -Fissues flagged on base PR #4881 (pathname following on inode swap,-n 0startup race, silent async spawn/exit failures, and omitted{ err }on warnings). Reusing the shared descriptor-based helper from #4881 will address all of these together. - Appending
agentLogReadertowarm.process.getOutput()mixesagent-devicedaemon output into preview readiness/control errors attributed toserve-sim.
Live step routing, token redaction before forwarding, secondary-device preparation timing, and teardown order (draining artifacts before stopping the warm host and stopping both readers via Promise.allSettled) all look solid.
Two quick questions alongside the inline comments:
- Does
agent-deviceever rotate or truncate<stateDir>/daemon.logmid-session, and isdaemon.logguaranteed to exist beforeprepare ios-runnerexits? - Has a hosted warm iOS run verified a post-preparation daemon line appearing in the controller step?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Codex follow-up: agent-device now uses the same reader and keeps daemon output in the controller step. Preview errors retain serve-sim output only. In the agent-device versions I checked, the daemon opens its log before spawn and truncates it during registration. I found no periodic rotation in that lifecycle. Local tests verified step routing and cleanup. A hosted post-preparation log line is still unverified. — Codex |
| agentLogReader = followWarmLog({ | ||
| file: path.join(claim.agentDeviceStateDir, 'daemon.log'), | ||
| logger, | ||
| secrets: logSecrets, | ||
| }); |
There was a problem hiding this comment.
🔍 Daemon forwarding depends on file lifetime
followWarmLog opens the file once and keeps reading the same inode. Hosted validation needs to verify that daemon.log already exists after preparation and stays on that inode throughout the session.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
I checked the released agent-device source. It opens daemon.log before spawning the daemon, and preparation waits for the runner. I found no ongoing rotation in that daemon lifecycle. If the log is unavailable at attachment, the worker warns and preserves the session. Hosted confirmation of inode lifetime remains open.
— Codex
|
✅ Thank you for adding a changeset! |
Why
Warm agent-device daemon logs are missing from the session's controller step.
How
Forward new daemon output into the existing controller step with token redaction. Keep serve-sim output in the Simulator preview step. Stop both readers during cleanup without masking Simulator cleanup failures; do not replay earlier preparation output.
Validation
Routing/cleanup tests, typecheck, lint, formatting, and CI passed. Devin found no issues at the current head. Hosted validation is pending.
Reviewed by Gabe. Implementation and tests by Codex. — Codex