Release v0.6.0 #37

Merged
john merged 10 commits from dev into main 2026-07-30 01:25:00 +00:00
Owner

XHR capture, console.error capture, Error formatting fixes. See PR #36.

XHR capture, console.error capture, Error formatting fixes. See PR #36.
john added 10 commits 2026-07-30 01:22:03 +00:00
test: ENG-BUG-REPORTER-011 — build artifact integration test
All checks were successful
CI / Detect Changes (pull_request) Successful in 5s
CI / Build & Lint (pull_request) Successful in 16s
CI / Docker Build (pull_request) Successful in 36s
12ac8d9afb
Add tests/integration/build-output.test.ts validating:
- dist/index.js (ESM), dist/index.cjs (CJS), dist/index.d.ts exist and non-empty
- ESM bundle exports initBugReporter (verified via bundle content inspection
  due to browser-only DOM APIs in the bundle preventing bare Node import)
- All 5 types declared in index.d.ts: BugReporterConfig, BugReport,
  CapturedError, FailedRequest, UserAction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge pull request 'fix: ENG-BUG-REPORTER-011 — Build artifact integration test' (#30) from feat/eng-bug-reporter-011 into dev
All checks were successful
CI / Detect Changes (push) Successful in 6s
CI / Build & Lint (push) Successful in 17s
CI / Docker Build (push) Successful in 34s
4e2de4bc64
docs: add 4 scaffolding files [skip cd] (#31)
All checks were successful
CI / Detect Changes (push) Successful in 5s
CI / Build & Lint (push) Has been skipped
CI / Docker Build (push) Successful in 37s
e9d340d416
ci: add docs-gate workflow [skip cd] (#32)
All checks were successful
CI / Detect Changes (push) Successful in 5s
CI / Build & Lint (push) Successful in 17s
CI / Docker Build (push) Successful in 35s
19c5507800
docs: refresh posture date [skip cd]
All checks were successful
CI / Detect Changes (push) Successful in 5s
CI / Build & Lint (push) Has been skipped
CI / Docker Build (push) Successful in 33s
36368c56db
chore: add AGENTS.md symlink for cross-harness invariance [skip cd] (#34)
All checks were successful
CI / Detect Changes (push) Successful in 6s
CI / Build & Lint (push) Has been skipped
CI / Docker Build (push) Successful in 37s
82d8ad3335
[skip cd] ci: standardize CI workflow naming (#35)
Some checks failed
CI / Backend (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Detect Changes (push) Has been cancelled
05816a1d66
fix: capture XMLHttpRequest and console.error (v0.6.0)
Some checks failed
CI / Backend (pull_request) Has been cancelled
CI / Docker Build (pull_request) Has been cancelled
Docs Gate / docs-ok (pull_request) Has been cancelled
CI / Detect Changes (pull_request) Has been cancelled
3a5e39e747
Two of the three capture channels were blind to any app built on axios.

NetworkInterceptor patched `globalThis.fetch` only. axios uses XMLHttpRequest,
so every backend call in an axios app was invisible and `failedRequests` came
back empty. ConsoleBuffer patched log/warn/info but not error — React Query and
most hand-written error handlers report through `console.error`, so the console
channel was empty too.

Together these are why BUG-515 in superclean-sys2 arrived with
`errors: [], console: [], failedRequests: []` — the reporter could not see
anything.

NetworkInterceptor:
- Patch XMLHttpRequest.prototype.open/send alongside fetch. Both transports
  feed the same failure buffer and request log.
- Records method, url, status, duration; captures response bodies subject to
  the existing 1KB byte-truncation.
- Finalizes on `loadend` — the single terminal event for load, error, abort and
  timeout alike.
- Transport failures land as status 0 with a `[xhr network error]` /
  `[xhr timeout]` marker body, so a status-0 entry is not silently
  indistinguishable from an empty response.
- Aborts are logged but not counted as failures. React Query and axios cancel
  in-flight requests routinely; counting those would bury the real failures.
- `responseText` is only read when responseType permits it (it throws a
  DOMException otherwise); responseType 'json' reads `response` instead.
- Instrumentation is wrapped so a capture failure can never break open()/send().
- destroy() restores both prototype methods on the constructor it patched.

ConsoleBuffer:
- Patched levels are now driven by one PATCHED_LEVELS list with 'error' added,
  replacing four near-identical copy-pasted blocks. A missing level was the bug;
  a single list is what stops it recurring.
- Error arguments now format as message + stack. JSON.stringify(new Error('x'))
  is '{}' — an Error has no enumerable own properties, so the previous
  formatting dropped the only useful part of `console.error('failed:', err)`.

Test infrastructure — the suite was entirely non-functional:
- vitest had no jsdom environment, so all 31 existing tests died on
  `ReferenceError: window is not defined`, and CI never ran `pnpm test` at all.
  Added jsdom + `test.environment` and a Test step after Build in ci.yml.
- 26 new tests for the two fixes. Verified red-green: 22 of them fail against
  the previous implementation. Suite is now 63 passing, up from 0.

Bundle is 12.85 kB gzipped, within the 15 kB constraint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q6VkoRihmoCUvXXYy8odKW
fix: do not repeat Error message alongside its stack
Some checks failed
Docs Gate / docs-ok (pull_request) Has been cancelled
CI / Backend (pull_request) Has been cancelled
CI / Docker Build (pull_request) Has been cancelled
CI / Detect Changes (pull_request) Has been cancelled
7aa259d8c1
Error.stack already opens with "Name: message", so prefixing the message printed
it twice in every captured console.error entry. Falls back to "name: message"
when stack is absent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q6VkoRihmoCUvXXYy8odKW
Merge pull request 'fix: capture XMLHttpRequest and console.error (v0.6.0)' (#36) from feat/fix-xhr-and-console-error-capture into dev
Some checks failed
CI / Backend (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Detect Changes (push) Has been cancelled
Docs Gate / docs-ok (pull_request) Has been cancelled
CI / Backend (pull_request) Has been cancelled
CI / Docker Build (pull_request) Has been cancelled
CI / Detect Changes (pull_request) Has been cancelled
b14908ca91
john merged commit 1457ea1fb8 into main 2026-07-30 01:25:00 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
haskytech/bug-reporter!37
No description provided.