Repository navigation
fix(id-web): detect .pm.json compound extension case-insensitively - #771
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Triage (issue-sweep 2026-10-24): this PR's Fix is PR #777 (updates all four sites in pkgs/id/flake.nix + pkgs/id/default.nix, plus the #643 Renovate grouping). Once #777 merges, merge main into this branch / re-run checks — the flake leg should then proceed past the fetch. No action needed on this PR's diff for this failure. |
|
Sweep 2026-10-24 17:00 CDT: merged current main 1161bcf (post-#746/#750 merges, includes the #643 p2panda hash fix) into this branch as add-commit 2d302a1 — the previous flake failure was on the stale pre-#776 base. Fresh CI is now running on the new head; merge + close #770 when the flake leg passes. |
|
Sweep unblock (2026-10-24 run): merged current main d95000a into this branch (add-commit 62af5c9, ls-remote verified). This PR's previous nix flake check FAILURE (run 40136591363) was solely id-test-web-typecheck failing on the #821 goto-line typecheck bug, which is now fixed on main by PR #822 (merged fa68786); all Rust test legs in that run passed (1632/1632). Fresh CI on the merged head is the gate — will merge + close #770 when the flake leg passes. |
|
Sweep note: the |
The id PR gate passes in ~51 minutes when it passes at all, and is cancelled at the 60-minute cap roughly as often (PRs #771, #833), forcing merges on local verification alone. 90 minutes gives the current check set headroom while #869 covers making the checks themselves faster or moving some off the PR path. Refs #869, #551
The id PR gate built all 22 checks in one job: ~51 minutes on a pass, cancelled at the 60-minute timeout roughly as often (PRs #771, #833). - guard job: runs the #300 flake-drift guard once and emits the id-pr-checks.txt list as the matrix (list file stays the single source of truth; a new listed check becomes a new parallel job). - check_each: one job per check, fail-fast off, 30m per-check cap; same nix installer, magic-nix-cache and KVM steps as before. - check: aggregator named 'nix flake check' so the required status context is unchanged; fails unless the whole matrix succeeded. Wall time is now the slowest single check plus setup instead of the sum of all 22. Supersedes the 60m -> 90m bump in #870: the serial job it padded no longer exists.
Fixes #770
Problem
detect_modelowercases the file extension before matching, but thecompound
.pm.jsonguard compared the raw filename with a case-sensitiveends_with(".pm.json").document.PM.JSONtherefore opened in Raw modeinstead of the Rich (ProseMirror) editor, creating it seeded empty bytes
instead of
{}, and the download-as-JSON path named the downloaddoc.PM.JSON.pm.json. Every other extension check in the module iscase-insensitive (its own tests pin
CHANGELOG.markdown→ Markdown).Fix
Lowercase the filename before the
.pm.jsonsuffix check at both sites(same pattern as
src/world_ssh.rs:985):pkgs/id/src/web/content_mode.rs—detect_modeRich guardpkgs/id/src/web/routes.rs— download-as-JSON filenameTests
Extended
test_detect_prosemirror_jsonin content_mode.rs:document.PM.JSONandDocument.Pm.Json→ Rich;config.JSONstays Raw(plain JSON is not promoted by case alone).
Need help on this PR? Tag
@codesmith-botwith what you need.