Report.ts pr: install-relative diff cannot apply to upstream's LifeOS/install/ layout
Version
LifeOS 8.761.0 · attestation: not run
What is broken
Report.ts pr cannot open a pull request against the current upstream layout. Its diff gate (diffDenied, via diffAllowed) accepts only install-relative paths such as skills/... or LIFEOS/..., because SYSTEM_TREES lists the install tree. The public repo's main keeps those files under LifeOS/install/, and recent PRs there (for example #2860, #2870) touch LifeOS/install/... paths. So a diff that passes the gate is applied with git apply --index at the repository root, where skills/... does not exist, and pr --yes stops at patch does not apply. The reverse also fails: a diff with LifeOS/install/... paths is refused by the gate. A second, smaller point: pr requires a locally built issue report (build --kind issue) even when the issue already exists upstream, so a contributor answering an existing issue has to build a throwaway issue report and must remember never to run file, which would post a duplicate.
Where (file:line)
skills/LifeOS/Tools/Report.ts:670 (apply), Report.ts:332 + Redact.ts:201 (gate), Report.ts:633 (built issue required)
Repro on a clean tree
1. Fresh shallow clone of danielmiessler/LifeOS main.
2. Change any shipped skill file, e.g. append a line to LifeOS/install/skills/ISA/SKILL.md, and write the diff install-relative (git diff --relative=LifeOS/install), which is the only form the pr gate allows.
3. git apply --index --check that diff at the repository root, exactly as Report.ts pr does at step 3.
4. It fails: skills/ISA/SKILL.md does not exist in the index. Applying with --directory=LifeOS/install succeeds.
Negative control
Probe: export LC_ALL=C; W=$(mktemp -d) && git clone -q --depth 1 https://github.com/danielmiessler/LifeOS.git "$W/r" && cd "$W/r" && printf "x\n" >> LifeOS/install/skills/ISA/SKILL.md && git diff --relative=LifeOS/install > ../skills-relative.patch && git checkout -q . && echo "paths the pr gate allows:" && grep "^diff --git" ../skills-relative.patch && git apply --index --check ../skills-relative.patch · exit 1 · captured 2026-11-20T15:39:41.803Z
paths the pr gate allows:
diff --git a/skills/ISA/SKILL.md b/skills/ISA/SKILL.md
--- stderr ---
error: skills/ISA/SKILL.md: does not exist in index
Suggested fix
In pr, apply the gated install-relative diff under the upstream install root when it exists (git apply --index --directory=LifeOS/install if LifeOS/install/ is present in the clone), and keep running stagedDenied on the staged paths with that prefix stripped. Optionally let pr take --issue <number> instead of a locally built issue report, so answering an existing issue needs no throwaway build.
Environment
- OS: macOS 26.6.2 (arm64)
- Harness: claude-code
- bun: 1.4.2 · git: 2.55.0
- Doctor broken: none
Attestation for this report, run afterwards: Report.ts attest reads modified (30 system files differ from v8.761.0 on this install), but none of them are the files cited above. skills/LifeOS/Tools/Report.ts, Redact.ts and SystemTrees.ts match the release byte for byte, so the line numbers point at shipped code.
That points at a second, smaller gap in the same flow: build writes attestation: not run and still produces the report, so a contributor can file without it, as happened here. Suggestion: build --kind issue and pr either run attest themselves or refuse when there is no attest.json in the report state. Any result would still pass (unmodified, modified, unattested); the gate only asks that the check ran.
If both changes fit (applying the diff under LifeOS/install/ when that directory exists, and the attest gate), I can open one PR with a test for each, red before and green after, the same way as #2889.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Thanks for reporting this. It's fixed in our tree, in a commit that landed after the 8.761.0 cut, so it ships in the next public release. Closing for now; reopen if you still see it on that release.
Fix: Report.ts findPayloadRoot 8e28decb7a