Skip to content

Add explicit debug boolean input to always enable debug logs - #41

Merged
bnavetta merged 3 commits into
mainfrom
factory/add-debug-input
Jul 31, 2026
Merged

Add explicit debug boolean input to always enable debug logs#41
bnavetta merged 3 commits into
mainfrom
factory/add-debug-input

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an explicit debug boolean input to the Oz Agent GitHub Action so users can always enable Oz debug logging, independent of GitHub's step-debug signal.

Previously, the action enabled --debug only when GitHub requested it (via core.isDebug(), which reflects the runner's step-debug signal). This adds a new debug input (default false) and enables debug logging when debug is true OR core.isDebug() is true — purely additive, preserving the existing GitHub-requested-debug behavior.

  • action.yml: new debug boolean input (default false)
  • src/index.ts: read core.getBooleanInput('debug'); pass --debug when debug || core.isDebug()
  • src/index.test.ts: 4 new regression tests covering all combinations of the debug input and core.isDebug() (see Verification)
  • README.md: new "Debug Logging" section documenting the input
  • dist/index.js + dist/index.js.map: rebuilt bundle (this repo ships a compiled dist/)
  • package-lock.json: repair pre-existing lockfile drift (from the CVE-2026-13149 fix in fix: update brace-expansion to resolve CVE-2026-13149 #39) that broke npm ci on main and on this branch — see Rework changes below

Verification

This is a headless GitHub Action change (no UI), verified in code per the repo's documented checks.

Regression tests (src/index.test.ts, 4 new — 27 total passing):

  • omits --debug when debug is false and GitHub step-debug is off — baseline behavior preserved
  • adds --debug when the debug input is true even without GitHub step-debug — the new behavior (this test fails before the fix: old if (core.isDebug()) returned false → no --debug)
  • still adds --debug from GitHub step-debug when the debug input is false — existing GitHub-requested-debug behavior preserved
  • adds --debug exactly once when both debug input and GitHub step-debug are on — no duplicate flag

Repo checks (all passing on Node 24.4.0, the version pinned in .node-version and used by CI):

  • npm ci → clean install, 333 packages
  • npm test → 27 passed (23 baseline + 4 new)
  • npm run lint → clean
  • npm run format:check → clean
  • npm run builddist/ and generated workflows unchanged (check-dist clean)

Rework changes

Rework cycle 1 — addressed the code-review finding that all four required CI jobs failed at npm ci.

  • 🚨 CRITICAL (package-lock.json): npm ci fails on Node 24fixed. The lockfile was missing the top-level @emnapi/core@1.11.3 and @emnapi/runtime@1.11.3 entries (optional peers of @napi-rs/wasm-runtime), so npm ci aborted with EUSAGE … Missing: @emnapi/core@1.11.3 from lock file. This drift is pre-existing on main (introduced by the hand-edited lockfile in fix: update brace-expansion to resolve CVE-2026-13149 #39); the earlier partial patch on this branch fixed only @emnapi/wasi-threads. The lockfile was regenerated in full with npm install --package-lock-only using the repo's pinned toolchain (Node 24.4.0 / npm 11.4.2), which adds the two missing packages and reconciles stale peer markers. No dependency versions changed beyond those additions.
  • Re-ran the complete documented gate on Node 24.4.0 after the fix: npm ci, npm run format:check, npm run lint, npm test (27 passed), npm run build (no diff in dist/, .github/workflows/, or consumer-workflows/). All four required CI jobs are green on the PR.

Originating thread: https://warpdev.slack.com/archives/C0BDQDW8V5E/p1784974804290319

Add a new `debug` action input (default false) that always enables Oz
debug logging (`--debug`), independent of GitHub's step-debug signal.
Debug logging now activates when `debug` is true OR `core.isDebug()` is
true, preserving the existing GitHub-requested-debug behavior.

- action.yml: new `debug` boolean input (default false)
- src/index.ts: read core.getBooleanInput('debug'); pass --debug when
  debug || core.isDebug()
- src/index.test.ts: cover debug true/false paths and that core.isDebug()
  still forces --debug on; assert --debug appears exactly once when both
  are on (4 new tests, 27 total)
- README.md: document the debug input in a new Debug Logging section
- dist/index.js: rebuilt bundle
- package-lock.json: reconcile @emnapi/wasi-threads 1.2.2 -> 1.2.3
  (pre-existing drift from CVE-2026-13149 fix that broke `npm ci`;
  required for the repo's documented checks to run)

Closes REMOTE-2331

Co-Authored-By: Warp <agent@warp.dev>
@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review July 31, 2026 20:12
oz-agent and others added 2 commits July 31, 2026 20:25
The lockfile was missing top-level @emnapi/core@1.11.3 and
@emnapi/runtime@1.11.3 (optional peers of @napi-rs/wasm-runtime), so
`npm ci` failed with EUSAGE on Node 24 and every required CI job died at
the install step. This drift is pre-existing on main (introduced by the
hand-edited lockfile in the CVE-2026-13149 fix) and also affected this
branch.

Regenerated the lockfile with `npm install --package-lock-only` using the
repo's pinned toolchain (Node 24.4.0 per .node-version, npm 11.4.2):
adds the two missing packages and reconciles stale `peer` markers. No
dependency version changes beyond the additions.

Verified on Node 24.4.0: npm ci, npm run format:check, npm run lint,
npm test (27 passed), npm run build (dist and generated workflows
unchanged).

Co-Authored-By: Oz <oz-agent@warp.dev>
@bnavetta
bnavetta merged commit 7d2a63f into main Jul 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants