Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .agents/pm/history/pm-brief-github-7e06b2eb1b44-135.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"hash_algorithm":"sha256","ts":"2026-10-19T09:02:38.433Z","author":"pm-github","author_source":"asserted","agent_harness":"ci","agent_provenance":{"model":null,"effort":null,"role":null,"topic":null},"op":"create","patch":[{"op":"replace","path":"/body","value":"## Reproduced on the published package\n\n`pm-brief@2026.9.26` (npm gitHead `a9e4651a3da7ae87a9bbe31f42c35d116c1bd29f`), with `@unbrained/pm-cli@2026.10.5`, Node 26.9.0. This is an in-process public API reproduction; it needs no Git, service credentials, or model calls.\n\n```js\nimport { buildBrief, renderMarkdownBrief } from \"pm-brief\";\nconst items = Array.from({length: 50}, (_, i) => ({\n id: `pm-fixture-${i}`,\n title: `Synthetic task ${i} ` + \"a\".repeat(300),\n type: \"Task\", status: i % 5 === 0 ? \"closed\" : \"open\", priority: 2,\n created_at: \"2026-10-01T00:00:00Z\",\n updated_at: \"2026-10-01T00:00:00Z\",\n tags: [], description: \"Synthetic fixture\", dependencies: []\n}));\nfor (const tokenBudget of [100, 1000, 4000]) {\n const brief = buildBrief(items, {\n tokenBudget, generatedAt: \"2026-10-05T00:00:00Z\", pmVersion: \"2026.10.5\"\n });\n console.log(brief.budget,\n Math.ceil(JSON.stringify(brief).length / 4),\n Math.ceil(renderMarkdownBrief(brief).length / 4));\n}\n```\n\nObserved: requested 100 and 1000 both return `estimatedTokens: 1226, truncated: true`, retaining three focus and three next items. The returned JSON's character-based estimate is 1227; rendered Markdown's is 856. Requested 4000 returns an estimated 1838 without truncation. These are the package's character-based estimation convention, **not** measured model-token counts.\n\n## Cause and impact\n\n[`compactToBudget`](https://github.com/unbraind/pm-brief/blob/e9e4c97e8360368d20a042268d105d056c4b34fd/index.ts#L1597) tries two fixed section caps and then returns the tighter object even when its estimate still exceeds the requested budget. Current main retains the same behavior.\n\nAn agent treating `--max-tokens` / `tokenBudget` as its allocation cannot rely on that bound. Changing render format also changes cost, while the brief uses a JSON estimate before rendering. The estimate disclosure is useful, but it does not enforce the advertised output allocation.\n\n## Acceptance\n\nBudget against the chosen rendered output, including receipts. Continue bounded compaction until it fits, or return a concise explicit cannot-fit result with the minimum required budget/recovery command. Preserve item references and expose omitted counts/retrieval instructions rather than silently losing context. Test ordinary and long fields, small budgets, JSON/Markdown/prompt/Slack, and the default 4000 budget.\n\nDuplicate check: all-status GitHub issue/PR pages and current main tracker checked on October 5; no matching budget-enforcement issue or open fix. Existing [pm-brief-nu7u](https://github.com/unbraind/pm-brief/blob/e9e4c97e8360368d20a042268d105d056c4b34fd/.agents/pm/features/pm-brief-nu7u.toon) owns the completed max-tokens alias, not this compactor failure.\n\n---\n\n### GitHub comments (2)\n\n> **@unbraind** (2026-10-05T11:37:40Z)\n>\n> Rechecked the newly published `pm-brief@2026.10.5` artifact (npm gitHead `3a8b85f0df2586753686edb841288b24f962bd97`; tarball SHA-512 verified) at 11:33 UTC on 5 October. The same 50-item synthetic fixture and fixed time from this issue still reproduce the overrun through the public `buildBrief` API.\n> \n> Environment: Linux, Node 24.19.0, `@unbrained/pm-cli@2026.10.5`. The original report used Node 26.9.0; this is a new bounded cloud check.\n> \n> | Requested budget | Returned estimatedTokens | truncated | JSON UTF-8 bytes | Markdown UTF-8 bytes |\n> | ---: | ---: | --- | ---: | ---: |\n> | 100 | 1226 | true | 4905 | 3423 |\n> | 1000 | 1226 | true | 4906 | 3424 |\n> | 4000 | 1838 | false | 7355 | 5269 |\n> \n> The estimate is the package's disclosed field, not an independently measured model-token count. Byte counts are the serialized outputs without a file-added JSON newline. No provider or model call was used.\n> \n> The shipped [final compaction return](https://github.com/unbraind/pm-brief/blob/3a8b85f0df2586753686edb841288b24f962bd97/index.ts#L1597-L1630) still returns after its fixed caps without enforcing the requested bound. [Release PR 136](https://github.com/unbraind/pm-brief/pull/136) updates release metadata; the issue remains applicable to 2026.10.5. This retest covers the three stated budgets and public JSON/Markdown representations, not the full format/field acceptance matrix.\n\n> **@unbraind** (2026-10-09T09:17:10Z)\n>\n> ## Published 2026.10.8 follow-up: compacted text omits the pending-merge warning\n> \n> The selected-rendering ceiling repair is now in the official `pm-brief@2026.10.8` artifact (npm gitHead `559779e7cfe72658b5886deda6e1020e802d46e3`). A separate semantic gap remains when compaction removes every receipt detail.\n> \n> With 12 pending receipts affecting items outside retained focus/next, the public API at budget 300 returns fitting Markdown, prompt and Slack output, but none includes the pending-merge warning, discarded-peer-context warning or affected item IDs. The model still preserves `pendingCount: 12` and all 12 `compromisedItemIds`; JSON exposes them. The text still says `mergeReceipts=12` and offers `pm merge report`, so this is not total loss of disclosure or a ceiling overrun.\n> \n> ### Minimal public API reproduction\n> \n> Run in an isolated directory with `pm-brief@2026.10.8` and `@unbrained/pm-cli@2026.10.9` installed:\n> \n> ```js\n> import { buildBrief, renderBrief } from \"pm-brief\";\n> const generatedAt = \"2026-10-05T00:00:00Z\";\n> const items = Array.from({ length: 13 }, (_, i) => ({\n> id: i ? `pm-peer-${i}` : \"pm-next\",\n> title: i ? `Other action ${i}` : \"Selected action\",\n> type: \"Task\", status: \"open\", priority: i ? 4 : 0,\n> created_at: generatedAt, updated_at: generatedAt,\n> tags: [], description: \"Synthetic fixture\", dependencies: []\n> }));\n> const ids = items.slice(1).map(i => i.id);\n> const mergeDecisions = {\n> pendingCount: ids.length, compromisedItemIds: ids,\n> receipts: ids.map((id, i) => ({\n> receiptId: `receipt-${i}`, itemId: id, itemPath: `tasks/${id}.toon`,\n> conflictResolution: \"preferred_side\", preferred: \"ours\",\n> conflicts: [{ field: \"description\",\n> discarded: \"discarded peer context \".repeat(220) }]\n> }))\n> };\n> for (const format of [\"markdown\", \"prompt\", \"slack\", \"json\"]) {\n> const brief = buildBrief(items, {\n> format, tokenBudget: format === \"json\" ? 500 : 300,\n> generatedAt, pmVersion: \"2026.10.9\",\n> nextCount: 1, focusIds: [\"pm-next\"], mergeDecisions\n> });\n> console.log(format, brief.mergeDecisions, renderBrief(brief, format));\n> }\n> ```\n> \n> API output: Markdown 686 UTF-8 bytes / 171 estimate units; prompt 948 / 237; Slack 640 / 157. These units are the package's `ceil(rendered JS string length / 4)` heuristic, not measured model tokens.\n> \n> ### Actual CLI confirmation and controls\n> \n> An independent synthetic tracker with 18 items and 12 local pending receipts reproduces the omission on the installed artifact with core 2026.10.9, Node 24.19.0, Linux. Five separate process samples per format at `--max-tokens 500` returned Markdown 1,042 bytes, prompt 1,324, Slack 1,016 and JSON 1,979. All fit; all three text formats omit the specific warning and affected IDs. JSON keeps the exact pending count and full ID set.\n> \n> High-budget text controls show the warning. A compromised retained-item API control preserves its inline marker. The input objects remain unchanged. No provider or model calls are part of the measured fixture. This is bounded synthetic acceptance, not full-suite or cross-platform certification.\n> \n> At budget 1, all four actual CLI commands exit 2 before creating the requested output file. Retrying the advertised minimum with the original options succeeds: Markdown 175, prompt 244, Slack 160 and JSON 387 heuristic units. A separate literal Markdown recovery command from the fixture directory also succeeds at 175. Other literal recovery commands were not tested.\n> \n> ### Cause, expected behavior and acceptance\n> \n> [Compaction clears only receipt details](https://github.com/unbraind/pm-brief/blob/559779e7cfe72658b5886deda6e1020e802d46e3/index.ts#L1738), but [mergeDecisionsIsEmpty](https://github.com/unbraind/pm-brief/blob/559779e7cfe72658b5886deda6e1020e802d46e3/index.ts#L1297-L1299) tests the detail array. The [Markdown, Slack and prompt helpers](https://github.com/unbraind/pm-brief/blob/559779e7cfe72658b5886deda6e1020e802d46e3/index.ts#L2021-L2085) then suppress the dedicated warning.\n> \n> An agent can receive a fitting brief that says no visible risks while the only explicit indication of discarded peer context has disappeared. Expected: retain a concise pending-merge risk signal, affected identities and recovery route; if those safety facts cannot fit, refuse explicitly. Keep correctness sets independent of display-detail caps.\n> \n> Acceptance should assert rendered semantics after receipt details reach zero in every text format, both when affected items are outside retained selections and when a selected item is affected. Preserve JSON identities/counts, omission accounting, input immutability and actual refusal/retry behavior; separately assert the ceiling.\n> \n> Ownership: [pm-brief-k8no](https://github.com/unbraind/pm-brief/blob/559779e7cfe72658b5886deda6e1020e802d46e3/.agents/pm/features/pm-brief-k8no.toon), [pm-brief-nd0k](https://github.com/unbraind/pm-brief/blob/559779e7cfe72658b5886deda6e1020e802d46e3/.agents/pm/features/pm-brief-nd0k.toon), and [pm-brief-8up0](https://github.com/unbraind/pm-brief/blob/559779e7cfe72658b5886deda6e1020e802d46e3/.agents/pm/issues/pm-brief-8up0.toon). All-status GitHub issues/PRs (both pages) and these current canonical records were rechecked on 9 October. Adding this evidence to the existing owner rather than creating a duplicate.\n>"},{"op":"add","path":"/metadata/id","value":"pm-brief-github-7e06b2eb1b44-135"},{"op":"add","path":"/metadata/title","value":"Enforce the requested brief budget after the final compaction step"},{"op":"add","path":"/metadata/description","value":"GH issue #135: https://github.com/unbraind/pm-brief/issues/135 · author @unbraind · state reason completed · created 2026-10-05T05:06:12Z · updated 2026-10-09T09:17:10Z"},{"op":"add","path":"/metadata/type","value":"Issue"},{"op":"add","path":"/metadata/status","value":"open"},{"op":"add","path":"/metadata/priority","value":2},{"op":"add","path":"/metadata/tags","value":["gh:unbraind/pm-brief#135","github_author:unbraind"]},{"op":"add","path":"/metadata/created_at","value":"2026-10-19T09:02:38.433Z"},{"op":"add","path":"/metadata/updated_at","value":"2026-10-19T09:02:38.433Z"},{"op":"add","path":"/metadata/author","value":"pm-github"}],"before_hash":"3cc22dff72be7b14824654a7a64ea62b04799939b2fee54c1b5f52ca60bf6df0","after_hash":"ce91c637674a09ad581df89820c5e3bc13d51dafecaae04b4e662ab05f1ee2df","item_hash_version":3,"message":"","event_class":"substantive","record_hash_version":1,"record_hash":"e662419d030b10c233b005b2a9e5131a80cf1d3d1af5b7c0f4a6f308a6a43045"}
{"hash_algorithm":"sha256","ts":"2026-10-19T09:02:38.512Z","author":"pm-github","author_source":"asserted","agent_harness":"ci","agent_provenance":{"model":null,"effort":null,"role":null,"topic":null},"op":"close","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-10-19T09:02:38.512Z"},{"op":"replace","path":"/metadata/status","value":"closed"},{"op":"add","path":"/metadata/closed_at","value":"2026-10-19T09:02:38.507Z"},{"op":"add","path":"/metadata/completed_at","value":"2026-10-07T12:19:04.000Z"},{"op":"add","path":"/metadata/close_reason","value":"GitHub issue #135 closed"}],"before_hash":"ce91c637674a09ad581df89820c5e3bc13d51dafecaae04b4e662ab05f1ee2df","after_hash":"9331f65fef3f5e4d2026414c901cacde207277818792c8e84b7b2ba2fdb02266","item_hash_version":3,"message":"bulk-item-transaction github-import-c266e749ac31bb43 6-close-pm-brief-github-7e06b2eb1b44-135-00f77126b09d apply","event_class":"substantive","record_hash_version":1,"record_hash":"0cd56e11e1fa934e812583e3a219b8cf3c55bed090d945f0db0269e550111546"}
2 changes: 2 additions & 0 deletions .agents/pm/history/pm-brief-github-7e06b2eb1b44-84.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"hash_algorithm":"sha256","ts":"2026-10-19T09:02:38.293Z","author":"pm-github","author_source":"asserted","agent_harness":"ci","agent_provenance":{"model":null,"effort":null,"role":null,"topic":null},"op":"create","patch":[{"op":"replace","path":"/body","value":"The `release` job of the Daily Release workflow failed.\n\n- Failing job: `release`\n- Run URL: https://github.com/unbraind/pm-brief/actions/runs/32807549729\n- Commit: cfc8b13f090a2466276f7fe90094357113deb8ee\n- Date (UTC): 2026-08-25T04:12:32Z\n\n\n---\n\n### GitHub comments (3)\n\n> **@github-actions[bot]** (2026-08-26T04:15:57Z)\n>\n> The `release` job of the Daily Release workflow failed.\n> \n> - Failing job: `release`\n> - Run URL: https://github.com/unbraind/pm-brief/actions/runs/32928959321\n> - Commit: eabbdec09b25fab977f0172659ce43f70c305344\n> - Date (UTC): 2026-08-26T04:15:56Z\n> \n\n> **@github-actions[bot]** (2026-08-27T14:28:47Z)\n>\n> The `release` job of the Daily Release workflow failed.\n> \n> - Failing job: `release`\n> - Run URL: https://github.com/unbraind/pm-brief/actions/runs/33081681149\n> - Commit: 08199c58284e400d11425e569064a1d6d867fcee\n> - Date (UTC): 2026-08-27T14:28:45Z\n> \n\n> **@unbraind** (2026-09-01T04:51:36Z)\n>\n> Closing as resolved and stale.\n> \n> This issue was filed automatically while npm publishing was broken fleet-wide between\n> 2026-08-23 and 2026-08-27. That outage is over. Measured today (2026-09-01), this repository's\n> last three scheduled release runs all succeeded, and the published version on npm matches the\n> current release:\n> \n> - release workflow: 2026-08-29 success, 2026-08-30 success, 2026-08-31 success\n> - npm `latest`: 2026.8.31\n> \n> Nothing here needs a fix; the failing condition no longer exists. The auto-filed issue simply\n> has no counterpart step that closes it once the workflow recovers, so it stayed open for five\n> days after the cause was gone.\n>"},{"op":"add","path":"/metadata/id","value":"pm-brief-github-7e06b2eb1b44-84"},{"op":"add","path":"/metadata/title","value":"Daily Release workflow is failing"},{"op":"add","path":"/metadata/description","value":"GH issue #84: https://github.com/unbraind/pm-brief/issues/84 · author @github-actions[bot] · state reason completed · created 2026-08-25T04:12:33Z · updated 2026-09-01T04:51:37Z"},{"op":"add","path":"/metadata/type","value":"Issue"},{"op":"add","path":"/metadata/status","value":"open"},{"op":"add","path":"/metadata/priority","value":2},{"op":"add","path":"/metadata/tags","value":["gh:unbraind/pm-brief#84","github_author:github-actions[bot]","release-failure"]},{"op":"add","path":"/metadata/created_at","value":"2026-10-19T09:02:38.293Z"},{"op":"add","path":"/metadata/updated_at","value":"2026-10-19T09:02:38.293Z"},{"op":"add","path":"/metadata/author","value":"pm-github"}],"before_hash":"3cc22dff72be7b14824654a7a64ea62b04799939b2fee54c1b5f52ca60bf6df0","after_hash":"d308e0f8268367521fb95106b3c7c937c3bd9690f04ee827e3f7f8213076fd91","item_hash_version":3,"message":"","event_class":"substantive","record_hash_version":1,"record_hash":"ba9143b240acf01fb030a7783805ab3e461df296eb4babf4e45f97c36e5aa02d"}
{"hash_algorithm":"sha256","ts":"2026-10-19T09:02:38.412Z","author":"pm-github","author_source":"asserted","agent_harness":"ci","agent_provenance":{"model":null,"effort":null,"role":null,"topic":null},"op":"close","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-10-19T09:02:38.412Z"},{"op":"replace","path":"/metadata/status","value":"closed"},{"op":"add","path":"/metadata/closed_at","value":"2026-10-19T09:02:38.407Z"},{"op":"add","path":"/metadata/completed_at","value":"2026-09-01T04:51:37.000Z"},{"op":"add","path":"/metadata/close_reason","value":"GitHub issue #84 closed"}],"before_hash":"d308e0f8268367521fb95106b3c7c937c3bd9690f04ee827e3f7f8213076fd91","after_hash":"2c3c4c66f53af63719c5cfc83037f9382e03dc4944810e3107b9a8bc6d524b2c","item_hash_version":3,"message":"bulk-item-transaction github-import-c266e749ac31bb43 3-close-pm-brief-github-7e06b2eb1b44-84-2ade0a74a939 apply","event_class":"substantive","record_hash_version":1,"record_hash":"89de761179d492c34ca15fd18128af709349f94ce8a70d3ef5c6cdf4a8fe963b"}
Loading
Loading