Skip to content

hygiene(#268+): pr-preservation drain-log for #425 (CommonMark fence indent)#456

Merged
AceHack merged 2 commits intomainfrom
drain/425-pr-preservation-log
Apr 25, 2026
Merged

hygiene(#268+): pr-preservation drain-log for #425 (CommonMark fence indent)#456
AceHack merged 2 commits intomainfrom
drain/425-pr-preservation-log

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented Apr 25, 2026

Summary

Otto-268 follow-on: drain-log for PR #425 (post-merge cascade to #357 fence-detection logic). Captures one substantive parser-correctness fix per CommonMark §4.5.

Per Otto-250 (PR review comments + responses + resolutions are high-quality training signals).

Coverage

  • lstrip(' ') + explicit tab-rejection on fence detection (P1, parser correctness): parent tools: PR-preservation minimal archive + Otto-207 session backfill (10 PRs) #357's fence-detection used raw_line.lstrip() (silently consumes tabs) before checking the marker. Per CommonMark §4.5, code fences are recognized only when the opening marker is preceded by at most 3 spaces (not tabs). Fix: lstrip(' ') (space-only) + explicit tab-rejection. Tab-indented + 4+-space-indented fence-shaped lines correctly fail the marker check.

Pattern observations

  1. CommonMark spec compliance is its own findings class. Codex catches this class reliably when parser code is in a PR.
  2. lstrip() vs lstrip(' ') is a subtle but load-bearing distinction in markdown parsing. CommonMark consistently distinguishes; many indent-related primitives need to be space-aware not whitespace-aware. Pre-commit-lint candidate: regex check on markdown-parser code for unconditional .lstrip() calls suggesting ' ' arg.
  3. Quiet-failure modes in markdown parsers are the most-dangerous bug class — tab-indented fence-shaped lines were silently misclassified with no exception / warning / test failure. Pattern generalizes: any parser that silently misclassifies-vs-rejects on edge cases needs explicit reject-paths.

Test plan

  • Finding preserved with severity + outcome class.
  • CommonMark §4.5 citation captured for future reference.
  • Drain-log shape matches existing docs/pr-preservation/*-drain-log.md template.

🤖 Generated with Claude Code

…indent)

Otto-268 follow-on: drain-log for the post-merge cascade PR #425
following parent #357 (fence-detection logic). Captures one substantive
parser-correctness fix per CommonMark §4.5.

Per Otto-250 training-signal discipline. Pattern observations:

1. CommonMark spec compliance is its own findings class. Custom
   markdown parsers easily diverge from §4.5 (fences), §6.1 (code
   spans), §3.1 (thematic break indent limit), etc. Codex catches
   this class reliably.
2. `lstrip()` vs `lstrip(' ')` is a subtle but load-bearing
   distinction in markdown parsing — Python's no-arg `.lstrip()`
   strips tabs; `' '` arg strips only spaces. CommonMark
   consistently distinguishes; many indent-related primitives need
   to be space-aware not whitespace-aware. Pre-commit-lint candidate.
3. Quiet-failure modes in markdown parsers are the most-dangerous
   bug class — tab-indented fence-shaped lines were silently
   misclassified with no exception / warning / test failure. Pattern
   generalizes: any parser that silently misclassifies-vs-rejects on
   edge cases needs explicit reject-paths for known-tricky inputs.
Copilot AI review requested due to automatic review settings April 25, 2026 07:17
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a PR-preservation drain log for PR #425 to capture the post-merge cascade finding about CommonMark code-fence detection (indent handling and tab behavior), aligning with the repo’s Otto-250 “training-signal” archive approach.

Changes:

  • Introduces a new drain-log document for PR #425 under docs/pr-preservation/.
  • Records a single thread describing the CommonMark §4.5 fence-detection correctness fix and summarises recurring pattern observations.

Comment thread docs/pr-preservation/425-drain-log.md
…ming

Copilot P1: drain-log claimed 'full record per Otto-250' but uses
the abbreviated Otto-268-wave shape (paraphrased finding, no
verbatim original-comment, no verbatim reply, missing per-thread
Thread-ID/file:line fields). Either add the missing fields (option
a) or adjust wording (option b).

Apply option (b): reword to 'abbreviated Otto-268-wave record' +
explicit pointer to docs/pr-preservation/_patterns.md shape-
divergence section + named contrast against canonical-shape
examples (#108, #395). The shape-conformance gap itself is now
documented honestly via _patterns.md (PR #467) as a known
divergence pending maintainer decision rather than a defect to
bulk-rewrite.
@AceHack AceHack merged commit b9e34d2 into main Apr 25, 2026
13 checks passed
@AceHack AceHack deleted the drain/425-pr-preservation-log branch April 25, 2026 08:11
AceHack added a commit that referenced this pull request Apr 25, 2026
Append-only row per Otto-229 discipline: drained 17 unresolved
threads across 8 of my own drain-log PRs (initial 13 + 4 cascade
findings on this drain wave's fixes). Documents the
'drain-log self-correction at scale' pattern — Codex/Copilot
reviews caught Class A/B pattern instances inside the same doc-lint
BACKLOG row that promotes them to lint candidates (appropriate
self-application).

PRs drained: #449 / #442 / #441 / #464 / #456 / #465 / #467 / #444.
Auto-merge SQUASH armed across the queue.

Cron f38fa487 minutely fire verified live throughout the tick.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants