Repository navigation
Description
Summary
pm health reports provenance_value_domain_invalid for provenance values that pm-cli itself wrote, and there is no command to repair them. In 2026.8.10 that warning is fatal under --strict-exit, so upgrading 2026.8.7 → 2026.8.10 turns a project's own history into a hard CI failure with no supported remediation.
Across 23 trackers here this affects 1,255 history events.
Root cause: CLAUDE_CODE_CHILD_SESSION is read as the agent role
On 2026.8.7, when the harness resolves to claude-code, provenance capture reads the env var CLAUDE_CODE_CHILD_SESSION as agent_provenance.role. That variable is a boolean flag set by Claude Code meaning "this is a child session" — its value is 1, not a role.
Reproduction (isolated HOME, empty env, nothing but the two variables):
env -i HOME=$H PATH=$PATH CLAUDECODE=1 CLAUDE_CODE_CHILD_SESSION=1 \
./node_modules/.bin/pm create --type Task --title x
# -> "role": {"value": "1", "source": "environment"}It is a straight pass-through of that variable's value, not a coincidence:
CLAUDE_CODE_CHILD_SESSION |
captured role |
|---|---|
1 |
{"value": "1", "source": "environment"} |
reviewer |
{"value": "reviewer", "source": "environment"} |
7 |
{"value": "7", "source": "environment"} |
Both variables are required: dropping either one yields role: null. CLAUDECODE=1 selects the claude-code harness; CLAUDE_CODE_CHILD_SESSION then supplies the value.
The capture bug is already fixed — on 2026.8.10 and 2026.8.13 the same environment yields {"value": "implementer", "source": "argv"}. This issue is about the data the old versions wrote, which is still on disk and now fails the gate.
The actual problem: a warning with no remediation
Same tracker, same files, three versions:
| pm-cli | pm health --strict-exit |
result |
|---|---|---|
| 2026.8.7 | exit 0 | wrote the bad values, did not flag them |
| 2026.8.10 | exit 1, ok: false |
flags them as fatal |
| 2026.8.13 | exit 0, ok: true |
flags them as a non-fatal warning |
warnings:
- "provenance_value_domain_invalid:claude-code:role:single_digit:19"
The remediation_map in the same health payload only covers telemetry_queue_pending:
remediation_map:
telemetry_queue_pending: "pm health --check-telemetry"There is no entry for provenance_value_domain_invalid, and no command repairs it. pm history-repair re-anchors drifted hash chains — it does not normalize provenance values, and the streams here are not drifted. So the only route left is hand-editing committed history/*.jsonl, which is exactly what pm exists to prevent, and which risks the hash chain.
Why this bites hard
Every repo pinned at ≤2026.8.7 has been accumulating these values. The moment one bumps to 2026.8.10 — a routine Dependabot PR — CI goes red on data the previous pinned version wrote, and the diff contains nothing related. That is what happened here: a dependency-bump PR failed its health gate while main was green, and the bump was innocent.
2026.8.13 relaxing this to a warning removes the outage but not the corruption: the values are still invalid, still reported, and still unfixable.
Requests
- A repair path. Something like
pm history-repair --normalize-provenance(or apm provenance repair) that drops or normalizes out-of-domain provenance values and records an audit marker, the wayhistory-repairalready does for hash chains. - A
remediation_mapentry forprovenance_value_domain_invalid, so the warning names its own fix liketelemetry_queue_pendingdoes. - Do not let a warning class change severity silently between releases. 8.7 ignored it, 8.10 made it fatal, 8.13 made it a warning — for identical bytes on disk. A gate whose verdict flips with no change to the input is one that measures the tool version rather than the project. If a new validation must be fatal, it needs a repair command shipped in the same release.
Environment
- pm-cli 2026.8.7 / 2026.8.10 / 2026.8.13, Node 22 + 26, Linux
- Reproduced in a scratch
pm initproject with an isolatedHOME, so no local settings are involved.
Activity
coderabbitai commentedon Aug 13, 2026
🔗 Related PRs
#200 - Add validation self-repair and agent ergonomics primitives [closed]
#712 - SDK context integrity: atomic Plans, batch similarity, sparse settings, and tombstones [merged]
#783 - Harden SDK context integrity, merge safety, and agent-efficient output [merged]
#935 - feat(sdk): govern runtime context, write safety, and verification gates [merged]
#957 - SDK agent command contracts, lossless recovery, and truthful context policy [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
Pin pm-cli to 2026.8.13 so the health gate stops failing on history p…
unbraind commentedon Aug 13, 2026
Tracked by pm-76fkpp. The earlier capture and advisory-disposition fixes remain closed; this successor owns audited repair and severity migration.
unbraind commentedon Aug 15, 2026
Resolved by merged PR #1016. Canonical tracker evidence: pm-76fkpp. SDK, CLI, and MCP now provide privacy-safe provenance census and audited normalization with repaired-chain verification.