Repository navigation
feat: AXI_DEBUG=1 prints the forwarded calcom argv to stderr - #14
Merged
Merged
Conversation
Triage needs the exact command calcom-axi ran, so a plain-CLI repro tests the axi's translation instead of one retyped by hand. The spawner prints one shell-quoted line per call with --api-key values masked; stdout stays TOON. The skill's gap template gains the two inherited-gap questions from axi-playbook process.md. Closes #13 Co-Authored-By: Claude Opus 5.5 <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.
Intent
Implement calcom-axi#13: add an AXI_DEBUG=1 convention so triage can see the exact calcom argv calcom-axi forwarded. This comes from the axi-playbook inherited-gap rule: gh-axi#163 was closed as a vendor bug because the plain-CLI repro was retyped by hand, while the wrapper's own argv translation caused it (fixed in gh-axi#188).
Decisions:
What Changed
src/calcom.ts: whenAXI_DEBUGis exactly1,runwrites one[axi-debug] calcom ...line to stderr per vendor call, before spawningcalcom. The line comes from the newdebugLine, which shell-quotes only the args that need it so the line can be pasted and rerun as-is. It masks--api-keyvalues in both the--api-key <v>and--api-key=<v>forms. Any other value ofAXI_DEBUG, including0, prints nothing. stdout stays clean TOON. Tests intest/calcom.test.tscover quoting, masking and env gating.skills/calcom-axi/SKILL.md: the fallback steps now point toAXI_DEBUG=1for seeing the exactcalcomcommand. The gap-report template gets the two inherited-gap questions: the plain CLI result with the forwarded argv, and whether the axi should shape the args, map the error or document the limit.README.mdandAGENTS.mddocument theAXI_DEBUGvariable.Closes #13
🤖 Generated with Claude Code
Risk Assessment
✅ Low: The change adds opt-in debug output to stderr. It is gated on AXI_DEBUG being exactly "1" in the only spawner (
run). Args are shell-quoted only when needed,--api-keyvalues are masked in both forms, stdout is untouched, and the docs and skill-template additions match every stated intent decision.Testing
I built calcom-axi in the worktree and ran it as an end user would, with a disposable fakecalcom(which logs the argv it receives) on a temp PATH and an isolated HOME. All eight live CLI scenarios passed: - one stderr debug line per calcom call, with stdout unchanged - only the exact value "1" enables it - the quoted line reproduces the same argv when pasted back into a shell - the credential is never printed - the line still appears when calcom fails - a rejected flag produces no line The --api-key masking requirement can't be reached through the CLI because calcom-axi never forwards that flag. A targeted unit test covers it, but I am reporting it as untested live. I removed dist, node_modules and the temp directory afterwards. This is a CLI-only change, so the evidence is a transcript, not screenshots.[axi-debug] calcom me show --jsonon stderr and leaves stdout as clean TOON--api-key Xand--api-key=X)Evidence: CLI transcript of all AXI_DEBUG scenarios
Evidence: Paste-and-rerun check
Evidence: Targeted debugLine unit test run
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
[axi-debug] calcom me show --jsonon stderr and leaves stdout as clean TOON--api-key Xand--api-key=X)pnpm install --frozen-lockfile && pnpm build(worktree-local), then rannode dist/bin/calcom-axi.jswith a throwaway fakecalcomfirst on a temp PATH, using a temp HOME and a fake CAL_API_KEYAXI_DEBUG=1 calcom-axi whoamiwith stdout and stderr captured separatelyAXI_DEBUG=1 calcom-axi bookings --status past --attendee-email "o'brien test@example.com" --limit 5, then pasted the printed line intosh -cand compared the argv the fake calcom received both timescalcom-axi whoamiwith AXI_DEBUG unset,0,true,1,1xandyes: checked stderr is empty and stdout matches the debug rungrep for the CAL_API_KEY value in the debug stderrFAKE_FAIL=1 AXI_DEBUG=1 calcom-axi agenda(calcom exits non-zero)AXI_DEBUG=1 calcom-axi(dashboard, two calcom calls)AXI_DEBUG=1 calcom-axi --version(fast path)AXI_DEBUG=1 calcom-axi bookings --bogus(flag rejected before any calcom call)pnpm exec vitest run test/calcom.test.ts(debugLine masking of both --api-key forms)✅ **Document** - passed
✅ No issues found.
src/calcom.ts- Could not run the TypeScript type check: node_modules isn't installed in this worktree, sotscisn't available, and installing dependencies was out of scope for this pass. Prettier --check passes on all changed files.✅ **Push** - passed
✅ No issues found.