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 — id(web): fenced code blocks without an info string are rewritten as indented blocks on save · Issue #954 · developing-today/code

id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954

New issue
Copy link
New issue
Copy link
Closed
Closed
id(web): fenced code blocks without an info string are rewritten as indented blocks on save#954
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)mode/onlineFully doable remotely: design, config, code, cloudpriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 26, 2026
Issue body actions

Problem

In the id web editor's markdown codec (pkgs/id/src/web/markdown.rs), a fenced code block without an info string is rewritten as an indented (4-space) code block on save. The user's chosen fence form is destroyed on every open→save, even when nothing else changed. An empty fenced block additionally gains a spurious blank line.

Evidence (verified this run)

Round-trip probe on main a2eef6f7 (standalone crate compiling the verbatim pkgs/id/src/web/markdown.rs against comrak 0.56.0 + serde_json; full logs in the goal's hidden_files/probe-2026-10-26-0312/out.log and out3.log):

Input Saved output
``` block with blank lines, no info (```\nline1\n\n\nline2\n```) indented block: line1\n \n \n line2
```` block containing a ``` line (no info) indented block: ```\n inner
fenced block (no info) inside a list item rewritten to a 6-space indented block inside the item
fenced block (no info) inside a blockquote rewritten to indented form (> code line)
empty fenced block (```\n```) ```\n\n``` — a blank content line appears
```rust block with blanks (control, has info) stays fenced, unchanged ✓

The rewritten forms are currently stable fixpoints (a second round-trip does not degrade them further), so this is a fidelity/diff-noise bug rather than progressive corruption — but the rewrite is unconditional: merely opening and saving a note reformats every info-less fenced block in it.

Root cause (to confirm in triage)

json_to_ast builds every code_block as fenced: true, fence_length: 3 (pkgs/id/src/web/markdown.rs:885-890), yet comrak's format_commonmark renderer still emits the indented form for these blocks — the cases above suggest it does so whenever there is no info string (the rust-info control stays fenced). Separately, the literal is always built as format!("{content}\n") (:890), so an empty block's literal is a single "\n", which renders as the spurious blank line. The existing round-trip test (test_roundtrip_code_block) only covers an info-carrying block, so neither behavior is pinned.

Why it matters

  • Silent reformatting on save pollutes diffs in synced/vault notes and erodes trust in the editor's other (correct) round-trips.
  • Indented code is context-fragile once the user edits the saved file by hand or in another tool: it cannot interrupt a paragraph, is invisible as a block, and is the form most likely to be mangled by other markdown tooling.
  • Info-less fences are the common case for plain shell/output snippets.

Acceptance criteria

  • A fenced code block without an info string round-trips open→save still fenced (byte-identical modulo the file's trailing newline), including blocks with blank lines, blocks containing ``` lines, and blocks nested in list items and blockquotes.
  • An empty fenced block round-trips with no spurious blank line added.
  • Info-carrying blocks and all existing codec tests are unchanged; new unit tests in pkgs/id/src/web/markdown.rs cover the info-less and empty cases.
  • Saved output is a stable fixpoint on a second round-trip.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 26, 2026
  2. github-actions
    assigned
    dezren39
    on Oct 26, 2026
  3. dezren39 commented on Oct 26, 2026

    @dezren39
    dezren39
    on Oct 26, 2026
    MemberAuthor
    More actions

    🤖 Agent note · state: filed

    • Agent: new-issue-creator job
    • Session / ID: new-issue-creator run 2026-10-26T08:28Z (scheduled 03:15 CDT)
    • Found via: filed this run
    • Task: Filed after a verified round-trip probe (standalone crate, verbatim markdown.rs, comrak 0.56.0) showed info-less fenced code blocks rewritten as indented blocks on save (and empty blocks gaining a blank line); queued as a triage packet — the comrak renderer mechanism needs confirming before a fix shape is chosen.
    • Expectation: effort/s — done when the acceptance criteria in the issue body pass with new codec unit tests.
    • Links: probe logs in goal hidden_files/probe-2026-10-26-0312/out.log and out3.log
  4. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job
    • Session / ID: new-issue-creator cron run 2026-10-26 19:45 CDT
    • Found via: filed this run (evidence added to this existing issue instead of a duplicate filing)
    • Task: New probe evidence for this issue: the "stable fixpoint" claim in the body does NOT hold when one list item contains TWO info-less fenced code blocks. Verified on main 70efcd4 (probe logs hidden_files/probe-2026-10-26-1945/out3.log, case bullet_two_code): orig - item + two blocks ("code", "more") → save 1 renders both as one indented region (` code\n\n more`) → re-parse yields a SINGLE code_block with literal `code\n\nmore` (PM2 inspected) → save 2 is that merged block. Block count changes 2 → 1: progressive corruption, not just fence-form fidelity. Therust control (bullet_two_code_info) keeps both blocks separate and is a fixpoint. Suggest adding "two adjacent info-less blocks in one list item stay two blocks" to this issue's acceptance criteria.
    • Expectation: whoever fixes id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954 includes the two-block list-item case in the regression tests.
    • Links: related new filing id(web): loose task list items fuse on save — task_list hardcodes tight, second paragraph/code block destroyed #1036 (task-list tightness, distinct code path)
  5. dezren39
    added
    effort/sSmall: expected under 2 hours of work
    mode/onlineFully doable remotely: design, config, code, cloud
    on Nov 1, 2026
  6. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-a
    • Session / ID: task 1103
    • Found via: queue claim
    • Task: task 1103 (triage for issue id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954) was assigned to the opencode execution lane on claim; handed off for the laptop claimant to launch the bound session. Fresh revalidation this shift: issue id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954 is OPEN with no hard-stop labels.
    • Expectation: the bound opencode session triage-verifies the comrak format_commonmark mechanism on current main, chooses the fenced-rendering fix, and enqueues or implements the follow-up per the packet, with round-trip unit tests.
    • Links: issue id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954
  7. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: OpenCode queue worker (repo-worker-code)
    • Session / ID: task 1103 · session ses_e5e616a4a90ffeyBiJM8oUG8au
    • Found via: queue claim · OpenCode claimant launch
    • Task: Work task 1103 for issue id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954: id(web): fenced code blocks without an info string rewritten as indented on save — triage renderer fix
    • Expectation: packet-defined; follow the packet acceptance criteria and repository runbook.
    • Links: id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954
  8. dezren39
    added
    queue/claimedQueue worker lifecycle state
    on Nov 3, 2026
  9. 55 remaining items

  10. dezren39
    added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    on Nov 10, 2026
  11. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · triaged

    • Agent: triage-step
    • State: triaged
    • Verdict: work kind task/small-fix · priority/low · effort/s · kind/bug
    • Priority why: priority/low — brief line 5: fidelity/diff-noise bug, no data loss or fleet impact; useful when convenient.
    • First step: In pkgs/id/src/web/markdown.rs, confirm why comrak emits the indented form for info-less fenced blocks (json_to_ast at :885-890) and make info-less blocks round-trip as fenced; fix the empty-block literal that adds a blank line.
    • Acceptance: Round-trip tests pin info-less fenced blocks (including in lists/blockquotes and the empty-block case) staying fenced with no spurious blank line, and the existing info-carrying control still passes.
    • Fix packet: repo-health:v1:fix:developing-today/code:issue:954 → queue repo-health-code-pilot, task 14530.
  12. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (triaged, per runbook §1c / #8097 rule 3)

    • Agent: queue worker (repo-worker-code), lane code-h
    • Session / ID: task 1103
    • Found via: queue claim
    • Task: task 1103 (triage) for issue id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954.
    • Verified fresh (gh, this shift): issue id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954 OPEN, no hard-stop labels, and it no longer carries status/needs-triage — the triage step's agent note is on this issue at 2026-11-10T04:42:16Z (verdict: task/small-fix, priority/low, effort/s; first step in pkgs/id/src/web/markdown.rs). Per §1c this packet is bookkeeping only; this lane does not re-triage.
    • Outcome: task 1103 completed as triaged. Issue id(web): fenced code blocks without an info string are rewritten as indented blocks on save #954 stays OPEN for its fix packet.
  13. dezren39
    removed
    queue/queuedHas a queued queue task
    on Nov 10, 2026
  14. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    agent-note:v1
    lane: code-w
    task: 14530
    issue: #954
    stage: claimed
    note: Task 14530 (small_fix, issue #954) picked up by lane code-w (direct, lane row 5991). Fresh check: issue #954 OPEN, no hard-stop labels, no status/needs-triage. Work: fix pkgs/id/src/web/markdown.rs so info-less fenced code blocks round-trip fenced (incl. blank lines, nested fences, list/blockquote nesting) and empty fenced blocks gain no spurious blank line; add unit tests. Next: create laptop worktree, inspect codec, reproduce.

  15. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 10, 2026
  16. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    agent-note:v1
    lane: code-w
    task: 14530
    issue: #954
    stage: done
    note: Task 14530 (small_fix, issue #954) verified already fixed on main by lane code-w (direct, lane row 5991); closing this issue on that evidence. The fix is present in pkgs/id/src/web/markdown.rs on main e94cf89: render option prefer_fenced forces the fenced spelling for info-less code blocks, json_to_ast builds an empty literal for empty blocks (no spurious blank line), and force_fenced_code_blocks_in_blockquotes covers the blockquote shape (landed via repo-keeper snapshot 7fb1e6d and commit 1ec98d8 for #1496). Verification run on the laptop this shift (cargo test --manifest-path pkgs/id/Cargo.toml --features web --lib, stub dist/ placeholder for RustEmbed): test_roundtrip_info_less_code_block_stays_fenced ok, test_roundtrip_empty_code_block_has_no_spurious_blank_line ok, test_roundtrip_code_block ok, test_info_less_code_block_keeps_following_paragraph_in_blockquote ok; full web::markdown module 266 passed, 0 failed. Every acceptance case (blank lines, fence-containing content, list item, blockquote, empty block, fixpoint) is pinned by those tests. No code change was needed from this task.

  17. dezren39
    closed this as completedon Nov 10, 2026
  18. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)mode/onlineFully doable remotely: design, config, code, cloudpriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.