feat(telemetry): record the effects the harness caused itself #891
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!891
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/hs68-effect-telemetry"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part 1 of #890. The telemetry, not the mirror.
What was missing
No span, no metric, no log line. So a read-only
eco__get_marketleft a full trace and this service running a process left nothing, which is the wrong way round for an audit record.Command execution
job.commandspan,sirens_echo.commandscounter.The verb is the label, the arguments are not.
gitandexecare this repository's own closed set. An argument is a clone URL or whatever a job kind declared, so it stays out.Three outcomes rather than a boolean, because an operator reading them wants to know which:
okexiteddid_not_runThe exit code goes on the span, not the metric - 0 to 255 is cardinality a closed outcome label does not want. The span also carries duration, the truncation flag, and the job id. Command output reaches none of them, for the same reason it never reaches a member.
Attachment ingest
attachment.fetchspan,sirens_echo.attachmentscounter, and every arm records - including the three that used tocontinuesilently:refused_host,fetch_failed,refused_binary,write_failed,stored.Before this,
discord.attachment.storedcounted the successes at the caller and nothing counted the rest, so a refused upload and no upload at all were the same observation.The URL never appears. The span carries the byte count and the status code instead, because a CDN path has the member's filename in it. Content does not appear either.
Two exception codes
sirens_echo.command.failedandsirens_echo.attachment.fetch_failed, bothfaultService, so neither failure is silently unclassified.While updating the bounds I found
docs/sirens-echo-exceptions.mdclaiming 34 unique types whenmainalready had 36 - stale before this branch, by two, independent of it. Corrected to 38.The part I deliberately did not do
None of this reaches the Temporal mirror.
The mirror keys off
RecordToolCallalone, so a newRecord*does not widen what leaves the process. Whether a command verb should be exported to a third-party SaaS is the disclosure decision #887's design says a person makes on purpose, and a command verb is closer to content thanmcp.tool.nameis.TestNeitherEffectReachesTheTemporalMirrorholds that line, and it asserts a tool call does mirror in the same run - so it cannot pass by simply never delivering anything, which is the way that test would otherwise rot.That leaves #890's question 2 open and unanswered on purpose. It is a
consultquestion and I have not touched it.Other tests
just gatepasses.closes #890
Second commit on this branch: the timeout test found a real bug, and it is fixed here rather than left asserting a false property.
CI failed the first push on
TestTheCommandTimeoutStillApplies, and it was right to.exec.CommandContextkills the direct child on expiry. It does not close the pipe, andCombinedOutputwaits for every writer to it - including a grandchild that inherited it. So a command whose shell forks outlived its own deadline for as long as the grandchild ran.Measured with the timeout set to 50 milliseconds:
That is why it was invisible. Where
shexecs the command the kill works, where it forks it does not, so CI and my laptop disagreed about the same test.ward exec <verb>runs builds and test suites, which spawn children as their whole purpose, sodefaultCommandTimeout's 10 minutes was the number a reader would quote and not the number that applied.command.WaitDelay = commandKillGracebounds the wait after the kill and closes the pipes.SIRENS_ECHO_COMMAND_KILL_GRACEdefaults to 5s, and the same test now finishes in 5.05s rather than 30s.Not fixed, and said out loud: the orphan is not reaped. This unblocks the harness rather than killing the process tree, which wants a process group and its own decision. Filed with both halves on #892.
I could have relaxed the assertion to get CI green. Leaving a test asserting a bound the code did not have seemed the worse trade.