Report.ts pr: install-relative diff cannot apply to upstream's LifeOS/install/ layout
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- git, typescript
- Lĩnh vực
- cli, developer-experience
Hướng nghiên cứu
Read skills/LifeOS/Tools/Report.ts around lines 332, 633, and 670, plus Redact.ts around line 201. Trace how pr validates diff paths and applies them at the repository root; reproduce with a diff for LifeOS/install/skills/ISA/SKILL.md. Done means accepted diffs apply in the upstream layout and staged path validation still works; the optional existing-issue workflow is a separate change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 19.9k
- Fork
- 2.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của danielmiessler/LifeOS
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
danielmiessler/LifeOS#2894 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
danielmiessler/LifeOS#2891 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
danielmiessler/LifeOS#2888 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
danielmiessler/LifeOS#2886 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
danielmiessler/LifeOS#2848 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của danielmiessler/LifeOS
Issue tương tự
-
CLI OAuth login fails behind an authenticating proxy: GET /api/v1/user omits Proxy-AuthorizationĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
lightdash/lightdash#33086 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[功能请求] 设置选项语言调整Đang mở功能请求
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
antithesishq/bombadil#473 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ardia-browser/ardia#3291 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The structured output reference promises null results for refusals that carry validation detailsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày