GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(id): split web/markdown.rs into four submodules (#4704) by dezren39 · Pull Request #8404 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

Fixes #4704. Splits pkgs/id/src/web/markdown.rs (6,273 production lines at the base) into cohesive submodules and removes its F11.10 line-guard grandfather entry in the same PR, per the issue's acceptance:

  • web/markdown/markdown_scan.rs (1,282 lines) — source scans: fence/HTML-block tracking, container prefixes, footnote/link-reference source scans.
  • web/markdown/parse_helpers.rs (1,281 lines) — link reference definitions, footnote synthesis, destination protection, table code-span escapes.
  • web/markdown/prosemirror_json.rs (1,479 lines) — ProseMirror JSON construction from the CommonMark AST (convert_node, inline/list conversion, placement validation).
  • web/markdown/markdown_serialization.rs (1,072 lines) — prosemirror_to_markdown and its rendering helpers, including hard-break placement normalization.
  • web/markdown.rs keeps the public API, json_to_ast, and the test module: ~1,176 production lines. Every resulting production file is at or below the 2,500-line limit; no behavior change (moved items only gained pub(crate) visibility; the root re-exports them).

Also in this PR, as a separate first commit: the one-character serve.rs typo fix for #8355 (_started_server_config), which broke every web+world build on current main — the split's verification could not compile without it. It is an independent commit and can be cherry-picked on its own.

The guard script's self-test example for a grandfathered path now uses pkgs/id/src/cli.rs (still grandfathered under #4715); the #4715 and #4717 grandfather entries are untouched.

This supersedes PR #7256, the earlier split attempt preserved from task 6599: that branch's split was built on a much older main (21 changed + 18 new items on main inside the moved region, including the link/image sanitization work, per the task 13547 analysis), and its flake-check part was already superseded by main's prod-lines-check. This PR re-derives the same four-module layout from current main instead of porting the stale branch.

Verification

  • cargo check --lib --features web,sandbox,ssh,world in pkgs/id — clean (after the id: serve.rs does not compile with the web feature (_started_server_config typo on main) #8355 commit).
  • cargo test --lib --features web web::markdown on the laptop — 266 passed, 0 failed (the full existing markdown suite, unchanged).
  • .github/scripts/check-production-line-limit.sh over the tree: no markdown file flagged; check-production-line-limit.test.sh — all contract tests pass.

Task 6691, lane code-g.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
repo-worker-code-k added 2 commits November 10, 2026 19:33
repo-worker-code-k
fix(id): serve.rs _started_server_config typo breaks web+world builds (…
afa2e5a
…#8355)
repo-worker-code-k
refactor(id): split web/markdown.rs into four submodules, remove line…
c54ec57
…-guard grandfather entry (#4704)
@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 01:44
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You'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 59 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bff83a89-d72b-4123-a210-2b432c0e53de
Commits

Reviewing files that changed from the base of the PR and between 11a754e and 87a1ffb.

Files selected for processing: 8

  • .github/scripts/check-production-line-limit.sh
  • .github/scripts/check-production-line-limit.test.sh
  • doc/2026-11-11T03-19-54Z_refactor_markdown_module_split/2026-11-11T03-19-54Z_refactor_markdown_module_split.md
  • pkgs/id/src/web/markdown.rs
  • pkgs/id/src/web/markdown/markdown_scan.rs
  • pkgs/id/src/web/markdown/markdown_serialization.rs
  • pkgs/id/src/web/markdown/parse_helpers.rs
  • pkgs/id/src/web/markdown/prosemirror_json.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T04:46:54.231073Z 87a1ffb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 11, 2026
WIP: preserve task 6599 implementation before main merge #7256
Closed
id: split pkgs/id/src/web/markdown.rs (5,284 production lines) — remove the F11.10 line-guard grandfather entry #4704
Closed
@dezren39

dezren39 commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

state: parked
task: 6691
lane: code-g
pr: 8404
outcome: pr_opened_ci_wait

Task 6691 (issue #4704): the markdown.rs split is implemented fresh from current main and opened as PR #8404 (branch queue/6691-4704-markdown-split): markdown_scan (1,282), parse_helpers (1,281), prosemirror_json (1,479), markdown_serialization (1,072), root markdown.rs ~1,176 production lines — all under the 2,500 limit, grandfather entry removed from .github/scripts/check-production-line-limit.sh, guard self-test example moved to cli.rs (#4715 entry untouched, as is #4717's).

Verification on the laptop: cargo check --lib --features web,sandbox,ssh,world clean; cargo test --lib --features web web::markdown — 266 passed, 0 failed; line guard over the tree flags no markdown file; guard contract tests pass. PR #7256 (the stale earlier split) is closed as superseded with a salvage note — its layout was adopted, its flake-check part was already superseded by main's prod-lines-check.

The branch also carries, as a separate first commit, the one-character serve.rs typo fix for #8355 (it broke every web+world build on main, so nothing here could compile without it).

Parking as a CI wait: merge PR #8404 when checks complete and any Codex findings are dispositioned (the diff is move-only apart from visibility prefixes, but Codex review on a 5k-line move deserves a real read). Merging closes #4704 and #8355.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 11, 2026
id: serve.rs does not compile with the web feature (_started_server_config typo on main) #8355
Closed
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
repo-worker-code-k
Merge remote-tracking branch 'origin/main' into queue/6691-4704-markd…
afb8c98
…own-split

# Conflicts:
#	.github/scripts/check-production-line-limit.sh
#	pkgs/id/src/web/markdown.rs
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 11, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: afb8c9800e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/web/markdown.rs
Comment on lines +250 to +253
mod markdown_scan;
mod markdown_serialization;
mod parse_helpers;
mod prosemirror_json;

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 11, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the required dated refactor design record

This split moves over 5,000 lines into four new modules, qualifying as the major refactor covered by pkgs/id/AGENTS.md's document-first requirement. The commit contains no dated refactor record, and repository-wide searches for the issue number, new module names, and markdown-split descriptions found no corresponding design document. Add the required dated document explaining the module boundaries and shared-helper visibility decisions so the architectural rationale is preserved.

AGENTS.md reference: pkgs/id/AGENTS.md:L159-L168

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 11, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4bab9f9: added the dated refactor record at doc/2026-11-11T03-19-54Z_refactor_markdown_module_split/2026-11-11T03-19-54Z_refactor_markdown_module_split.md (pkgs/id/docs/ is a symlink to the repo-root doc/ tree where dated records live). It documents the request and scope from #4704, the four module boundaries (markdown_scan, parse_helpers, prosemirror_json, markdown_serialization, plus what the root keeps), the visibility rule the split applied (pub(crate) at most for moved items, root re-exports, no crate-boundary widening), the guard-entry removal, the split-time verification, and a dated update section covering the merge with main (the #1002 port into markdown_serialization.rs / parse_helpers.rs / root tests and the combined grandfather-list resolution). The record notes it was written at review time in response to this finding.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
repo-worker-code-k added 3 commits November 10, 2026 21:21
repo-worker-code-k
docs(id): dated refactor record for the markdown.rs split (#4704)
4bab9f9
repo-worker-code-k
Merge remote-tracking branch 'origin/main' into queue/6691-4704-markd…
545eb4a
…own-split

# Conflicts:
#	.github/scripts/check-production-line-limit.sh
repo-worker-code-k
test(guard): drop grandfather fixture from line-guard contract test (#…
87a1ffb
…4704)

The merged grandfather list is empty: main removed the world_session
entry when its #4717 split landed, and this branch removes the
markdown.rs entry. The contract test fixture named a grandfathered
path (world_session on this branch, markdown on main); with no entry
left, the compliant-tree case now asserts a plain pass and records
how to restore the fixture if an entry returns.
@dezren39

dezren39 commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · main merged, guard conflict resolved, tests re-verified — task 6691 resumed

  • Agent: repo queue worker, lane tmp-code-e (repo-worker-code), task 6691 (issue id: split pkgs/id/src/web/markdown.rs (5,284 production lines) — remove the F11.10 line-guard grandfather entry #4704).
  • State on claim: PR refactor(id): split web/markdown.rs into four submodules (#4704) #8404 was mergeable: false / dirty against current main — the split was verified, but main had moved. This session merged origin/main (11a754e) into the branch (merge commit 545eb4a).
  • Sole conflict: .github/scripts/check-production-line-limit.sh grandfather list. Resolution: the list is now EMPTY — main had removed the world_session/mod.rs entry when its id: split pkgs/id/src/world_session/mod.rs (2,821 production lines) — remove the F11.10 line-guard grandfather entry #4717 split landed, and this PR removes the web/markdown.rs entry; the merged file keeps neither, with a comment recording both removals.
  • Contract-test fallout, fixed in 87a1ffb: the guard contract test fixtures named a grandfathered path (world_session on this branch, markdown on main). With the list empty, the compliant-tree case now asserts a plain pass and records how to restore the fixture if an entry returns. All 9 contract cases pass.
  • Guard on the merged tree: exactly the 4 pre-existing main failures (fleet-queue client.rs 3117, turso_queue.rs 6887, serve.rs 2696, directory.rs 2610) — no markdown, no world_session, no new violations. (Local runs also list generated files under pkgs/id/target/; those are build artifacts, absent in CI.)
  • Codex: the one P1 finding (dated refactor design record) was fixed in 4bab9f9 and dispositioned on its thread; no other findings.
  • Infra note: the first test run died with ENOSPC — the laptop /home was at 100% (197M free; tracked on issue infra: laptop /home at 100% — fleet worktree cargo targets fill the disk, builds die with ENOSPC #6797). A cargo clean of this task's own worktree target freed 10 GiB and the re-run proceeded.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 8f7a6f1 into main Nov 11, 2026
1 of 8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/6691-4704-markdown-split branch November 11, 2026 04:45
dezren39 pushed a commit that referenced this pull request Nov 11, 2026
repo-worker-tmp-code-b
style(id): format the markdown-split files (rebase onto #8404)
6588398
This was referenced Nov 11, 2026
main-broken: developing-today/code id @ea31e75 — nix flake check #2222
Closed
Unowned PR batch from branch disposition (2026-11-07) #7297
Open
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

id: split pkgs/id/src/web/markdown.rs (5,284 production lines) — remove the F11.10 line-guard grandfather entry

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.