Skip to content

docs: expand Chapter 08 bitwise operations and add chapter-structure CI - #15

Open
yuchdev wants to merge 10 commits into
masterfrom
docs/ch08-bitwise-and-chapter-validator
Open

yuchdev wants to merge 10 commits into
masterfrom
docs/ch08-bitwise-and-chapter-validator

Conversation

@yuchdev

@yuchdev yuchdev commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Expand bitwise chapter beyond C++20 with senior-level notes on rotations, endianness, bit-fields, zero-count scan contracts, power-of-two overflow, masks, concurrency, and C++26 SIMD. Introduce a stdlib-only Python chapter-structure validator and GitHub Actions workflow for Book 01. Validator checks five required final H2 sections, consecutive numbered H2s, standards timeline C++98/03–26, TODO placeholders, and balanced code fences. Chapter README is the primary documentation change; existing C++20 build remains. CI validation required.

Copilot AI balanced review requested due to automatic review settings October 18, 2026 17:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new gate fails on existing chapters, and the validator misclassifies legitimate prose and fenced Markdown.

4 open issues
What changed in this PR

Expands Chapter 08’s advanced bitwise coverage and introduces structure validation for Book 01, while retaining the C++20 build.

Changes:

  • Adds notes on rotations, endianness, scan contracts, overflow, concurrency, and C++26 SIMD.
  • Adds a standard-library-only Python validator and GitHub Actions workflow.
File Description
scripts/​check_chapter_structure.py Validates chapter headings, timelines, placeholders, and fences.
01_low_level/​08_bitwise_ops/​README.md Expands bitwise explanations and references.
.github/​workflows/​chapter-structure.yml Runs Book 01 structure validation in CI.

Review effort: Balanced

Comment thread .github/workflows/chapter-structure.yml Outdated
with:
python-version: '3.12'
- name: Validate Book 01 chapter structure
run: python scripts/check_chapter_structure.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR and push runs now validate only changed chapter READMEs; the full-book audit remains available through manual dispatch while the legacy chapters are migrated (3c2c92c).

Comment thread scripts/check_chapter_structure.py Outdated
Comment thread scripts/check_chapter_structure.py Outdated
chapter = CHAPTER.match(path.parent.name)
if not chapter:
return [f"{path}: not a numbered chapter directory"]
headings = [(len(m.group(1)), m.group(2)) for m in HEADING.finditer(body)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Headings and timeline boundaries/entries are now read from text outside fenced code blocks.

Comment thread scripts/check_chapter_structure.py Outdated
Comment on lines +44 to +46
fences = FENCE.findall(body)
if len(fences) % 2:
errors.append("unbalanced fenced code blocks")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fence validation now tracks delimiter character and length, and only accepts a matching closing fence with no trailing content.

Co-authored-by: yuchdev <678436+yuchdev@users.noreply.github.com>
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.

3 participants