This was generated by AI during triage.
Part of #943 (telemetry @path-as-body observability fail-open). This is the repo-actionable defense-in-depth split out of #943 so it can be picked up autonomously; the remaining part of #943 (routing the operator loop-prompt through the sanctioned wrapper — out of this repo) stays on #943 as a human-gated item.
Scope (from the #943 planning analysis — see plan)
Two repo-local hardenings, neither of which alone closes #943 but which make the fail-open catchable and documented:
- Harden the sanctioned telemetry wrapper (
telemetry-upsert.sh) with post-write read-back verification — after the comment upsert, re-read the written body via the API and fail loud (non-zero exit / visible error) if the body starts with a literal @ or is below a sanity-length floor. The wrapper is structurally safe today (it uses --body-file), so this guards against future misuse / other callsites, not a current wrapper defect.
- Canonicalize the anti-pattern rule — document, in the shared lane doctrine, that telemetry/comment edits MUST use
--body-file <path> (or piped content) and MUST NEVER interpolate an @path string into a --body / -f body= argument (gh expands @ only for --body-file / -F field syntax).
Decision defaulted: the anti-pattern rule's home is lanes/SKILL.md (the shared lane doctrine), NOT babysit-prs (which has zero telemetry surface of its own) — veto before merge.
Acceptance
- An
@path-as-body write routed through the wrapper is caught at write time and fails loudly instead of silently degrading (a comment that "looks fresh" but carries no data).
- The anti-pattern rule is stated once in the canonical lane doctrine location.
- Regression coverage if a test harness exists for the wrapper script.
Note: full closure of #943's fail-open also requires the operator loop-prompt to route its telemetry writes through this wrapper (out-of-repo, tracked on #943).
This was generated by AI during triage.
Part of #943 (telemetry
@path-as-body observability fail-open). This is the repo-actionable defense-in-depth split out of #943 so it can be picked up autonomously; the remaining part of #943 (routing the operator loop-prompt through the sanctioned wrapper — out of this repo) stays on #943 as a human-gated item.Scope (from the #943 planning analysis — see plan)
Two repo-local hardenings, neither of which alone closes #943 but which make the fail-open catchable and documented:
telemetry-upsert.sh) with post-write read-back verification — after the comment upsert, re-read the written body via the API and fail loud (non-zero exit / visible error) if the body starts with a literal@or is below a sanity-length floor. The wrapper is structurally safe today (it uses--body-file), so this guards against future misuse / other callsites, not a current wrapper defect.--body-file <path>(or piped content) and MUST NEVER interpolate an@pathstring into a--body/-f body=argument (ghexpands@only for--body-file/-F fieldsyntax).Decision defaulted: the anti-pattern rule's home is
lanes/SKILL.md(the shared lane doctrine), NOTbabysit-prs(which has zero telemetry surface of its own) — veto before merge.Acceptance
@path-as-body write routed through the wrapper is caught at write time and fails loudly instead of silently degrading (a comment that "looks fresh" but carries no data).Note: full closure of #943's fail-open also requires the operator loop-prompt to route its telemetry writes through this wrapper (out-of-repo, tracked on #943).