worclaude 2.4.9 → 2.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,39 @@ All notable changes to worclaude are documented in this file. Format loosely fol
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [2.4.11] — 2026-04-20
8
+
9
+ Internal fix release — the `upstream-check` workflow parser has been unable to classify any item correctly since the `anthropics/claude-code-action` SHA was pinned to v1.0.101. The action writes `$RUNNER_TEMP/claude-execution-output.json` as a pretty-printed JSON array (`JSON.stringify(messages, null, 2)`), not the newline-delimited JSONL our parser assumed. Every per-line `JSON.parse` failed on fragments like `[` and `{`, so `extractAssistantText` always returned `null` and the parser fell through to the raw-content fallback — which never matched the `SKIP_ISSUE` / `# Title: ` contract, producing a parse-error fallback issue on every run with new items. Misdiagnosed as prompt/contract drift (issue #89); the 2.4.10 fallback-size fix delivered the diagnostic (issue #91) that revealed the real cause.
10
+
11
+ ### Fixed
12
+
13
+ - `scripts/upstream-parse.mjs` — `extractAssistantText` now parses the execution file as a single JSON array and pulls text-only content from the last non-empty `assistant` event. `tool_use` blocks are filtered out so tool-call turns (Claude reading feed files) cannot clobber the real final response. Falls back to treating the raw content as the response only when JSON parsing fails — preserves the existing plaintext path. JSONL support removed entirely: the action SHA is pinned and the format is deterministic.
14
+
15
+ ### Changed
16
+
17
+ - `scripts/upstream-parse.mjs` — post-implementation cleanup (PR #92 follow-up): removed the unreachable "empty title" branch and the redundant `stripBomAndLeading()` (ECMAScript `trim()` already strips U+FEFF); hoisted parser grammar to named constants (`SKIP_MARKER`, `TITLE_PREFIX`, `BODY_MARKER`) and the empty-output template to `EMPTY_OUTPUTS`; added defaults to `reportParseError`; fixed a double UTF-8 encoding in `buildRawBody` (encode once, reuse `buf.byteLength`). Script reduced from 205 to 188 lines with no behavior change.
18
+
19
+ ### Tests
20
+
21
+ - `tests/scripts/upstream-parse.test.js` — 14 → 20 tests. New fixtures `exec-with-tool-use.json` (tool_use filtering across multiple turns) and `exec-with-hooks.json` (worclaude's dogfooded `SessionStart` hook emits `system:hook_response` events carrying a payload that includes the literal token `SKIP_ISSUE` in prose — parser must NOT treat hook output as Claude's response). Old `.jsonl` fixtures deleted and regenerated as `.json` arrays to match the real on-disk filename. Suite now 559 tests across 33 files.
22
+
23
+ ## [2.4.10] — 2026-04-20
24
+
25
+ Internal fix release — the `upstream-check` workflow's parse-error fallback (which files a diagnostic issue when Claude's response fails the parser contract) itself failed on 2026-04-20 with `GraphQL: Body is too long (maximum is 65536 characters) (createIssue)`. The fallback wrote the entire `.jsonl` execution transcript — assistant turns plus every `Read` tool call and result — as the issue body. Claude reads three input files per run, so the transcript routinely exceeds GitHub's 65 KB issue body limit. The fallback path broke precisely when it was supposed to deliver diagnostic data.
26
+
27
+ ### Fixed
28
+
29
+ - `scripts/upstream-parse.mjs` — `buildRawBody()` now prefers the extracted last assistant turn over the full transcript (no tool-result noise). Falls back to the transcript only when assistant text is empty or unparseable. Truncates at 60,000 bytes with a `[truncated]` marker, byte-aware so UTF-8 sequences aren't split. The next parse-error will open a readable fallback issue with Claude's actual response, enabling diagnosis of contract drift (tracked in issue #89).
30
+
31
+ ### Changed
32
+
33
+ - `scripts/upstream-parse.mjs` now exports `runParse`, `buildRawBody`, `extractAssistantText`, and `MAX_RAW_BYTES`. The CLI entry is guarded with an `import.meta.url` check — still directly executable via `node scripts/upstream-parse.mjs`, now also unit-testable.
34
+ - `scripts/_gha-outputs.mjs` moves the `GITHUB_OUTPUT` env read from module-load into `writeOutputs()`. No production behavior change; enables tests that set the env after importing the helper.
35
+
36
+ ### Tests
37
+
38
+ - New `tests/scripts/upstream-parse.test.js` — 14 tests covering happy paths, every error branch, the new truncation logic, the assistant-text-only fallback, and `extractAssistantText` unit cases. Suite now 553 tests across 33 files.
39
+
7
40
  ## [2.4.9] — 2026-04-20
8
41
 
9
42
  CI fix release — the daily `upstream-check` workflow failed at `anthropics/claude-code-action` with `Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable`. The action exchanges an OIDC token for a GitHub App token before the Anthropic API auth layer runs; that exchange requires `id-token: write` in workflow permissions regardless of `CLAUDE_CODE_OAUTH_TOKEN`. Prior runs succeeded intermittently because GitHub does not consistently inject the token URL when no job in the run declares the permission.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worclaude",
3
- "version": "2.4.9",
3
+ "version": "2.4.11",
4
4
  "description": "The Workflow Layer for Claude Code — scaffold agents, commands, skills, hooks, and memory into any project",
5
5
  "type": "module",
6
6
  "bin": {