Skip to content

[CTX-1611] ci: run the rustdoc gate in the quality job - #2737

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-1611/ci-doc-check
Oct 27, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-1611/ci-doc-check

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Priority: P2 | Area: ci | Labels: fix,P2,area:docs | Milestone: v0.0.30 | RFC: OQ-DOC-GATES | Task: CTX-1611

Summary

just doc-check existed since #2713 but was not wired into CI, so a private intra-doc link could land silently. #2732 did exactly that (shaped.rs linking pub(crate) system_db), and only the #2733 follow-up caught it.

Adds one shard-1 quality step after formatting:

- name: Check rustdoc
  if: matrix.shard == 1
  run: RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked

--no-deps keeps third-party docs out; the step shares the job's workspace build cache and sccache, so it is incremental. AGENTS.md now states that CI enforces the same command. The local just check deliberately stays without it (the justfile explains the metadata rebuild cost); just doc-check remains the local gate.

Validation

  • actionlint .github/workflows/ci.yml clean; act -n dry-run parses the workflow.
  • just doc-check passes on this base.
  • yamllint -d relaxed reports only the pre-existing line-length warning at 1815.

Closes #2735.

Summary by CodeRabbit

  • Documentation
    • Clarified references in project documentation and comments.
  • Quality Checks
    • Added a documentation build check to continuous integration; documentation warnings now fail the check.

@Xuepoo Xuepoo added this to the v0.0.30 milestone Oct 27, 2026
@Xuepoo Xuepoo added fix Bug fix P2 Priority: medium area:docs Area: documentation labels Oct 27, 2026
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 21 minutes.

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: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b460af06-f4fe-4c5f-8cfa-bbac957db648
Commits

Reviewing files that changed from the base of the PR and between b3fdc56 and 047d89c.

Files selected for processing: 2
  • .github/workflows/ci.yml
  • AGENTS.md

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d0c0f6fe-1e6a-40fa-97a0-9c82b4acb0dd
Commits

Reviewing files that changed from the base of the PR and between 56971c8 and b3fdc56.

Files selected for processing: 4
  • .github/workflows/ci.yml
  • AGENTS.md
  • crates/bitty-render/src/shaped.rs
  • crates/bitty-terminal/src/profile.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The quality job now runs a locked workspace rustdoc check on shard 1 and treats rustdoc warnings as errors. The local gate instructions describe the CI check, and two documentation references are formatted as inline code rather than Rustdoc links.

Changes: Rustdoc CI gate

Layer / File(s) Summary
Add and document the rustdoc gate
.github/workflows/ci.yml, AGENTS.md, crates/bitty-render/src/shaped.rs, crates/bitty-terminal/src/profile.rs
The shard-1 quality job runs cargo doc --workspace --no-deps --locked with RUSTDOCFLAGS="-D warnings". The local gate instructions describe CI enforcement. Two comments format references as inline code instead of Rustdoc links.

Priority: Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related issues

  • Issue 2713 — The PR adds CI wiring for the documented rustdoc check and removes one private intra-doc link; it does not update the other links noted in the issue.

Possibly related PRs

  • bitty-terminal/bitty#2732 — This PR adds the CI rustdoc gate and removes a private intra-doc link from documentation introduced by that PR.

Suggested labels: chore

Merge Risk: Minimal · previous review b3fdc

The Rustdoc CI gate matches the local command and uses the existing cache setup; no merge-blocking risk remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding the rustdoc gate to the CI quality job.
Linked Issues check Passed Issue #2735 requires a workspace rustdoc gate in CI. .github/workflows/ci.yml adds Check rustdoc on quality shard 1 after formatting with `RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-dep…
Out of Scope Changes check Passed The changes stay within issue #2735. The workflow change adds the requested CI gate. The AGENTS.md update documents the same gate and local scope. The two documentation-link edits remove failures th…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
Full details: Linked Issues check

Explanation

Issue #2735 requires a workspace rustdoc gate in CI. .github/workflows/ci.yml adds Check rustdoc on quality shard 1 after formatting with RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked, which matches the just doc-check command. The step uses the job-wide CARGO_TARGET_DIR, sccache, and Rust cache setup. justfile documents why doc-check remains separate from just check, and AGENTS.md documents the CI command. The changed private links no longer produce the targeted rustdoc failures.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #2735. The workflow change adds the requested CI gate. The AGENTS.md update documents the same gate and local scope. The two documentation-link edits remove failures that the new gate must detect. No unrelated runtime behavior changes are present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (2 skipped: 2 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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

Comment @coderabbitai help to get the list of available commands.

@Xuepoo
Xuepoo force-pushed the ctx-1611/ci-doc-check branch from b3fdc56 to a0f30eb Compare October 27, 2026 03:38
Xuepoo added a commit that referenced this pull request Oct 27, 2026
… prepends safely (#2738)

Second review of the grapheme rework (bitty#1767); rebased onto the merged
first round (bitty#2734), so this commit is the follow-up only.

Render (must-fix 1):
- A paint group with more than one shaped member is one committed layout
  unit; its entries advance inside that unit (`कि`: 4.16 px + 13.81 px for
  one cell), so the per-cell advance gate must not read them as a cell
  advance. The gate now skips multi-member groups, and entries sharing a
  byte offset are excluded from the median that serves as its reference.
  Deterministic FakeShaper cases (`कि`, `क्ष`, a flag pair without a
  ligature, a ZWJ family, a wide ambiguous scalar) pin every member painting
  without host fonts.
- The gate measures the shaper's own (narrow) cell count, so a wide East
  Asian ambiguous cluster stays shaped under
  `terminal.ambiguous_width = "wide"` instead of degrading because the
  policy span is two cells.

Terminal truth (must-fix 2):
- `restore_scrollback_text` selects the first non-zero-width scalar as
  `Cell::glyph`, so a leading `Prepend` (`"\u{0600}1"`) can no longer hide
  its base. Leading zero-width scalars attach to the preceding cell's tail
  (stepping back over a wide spacer) exactly like `print`, and a
  line-leading one is dropped.
- Tail overflow mirrors print: zero-width scalars past the bound drop, a
  printable scalar starts a fresh cell instead of truncating the line.
- Restore tests cover `"\u{0600}1"`, `"a\u{0600}1"`, and a nine-scalar
  printable cluster.

Follow-ups:
- The generated UAX #29 tables now carry the full
  `Grapheme_Cluster_Break=Control` class (19 ranges, 3893 scalars),
  replacing the curated GB4/GB5 list that missed soft hyphen, the Mongolian
  vowel separator, the bidi isolates, the interlinear/musical/shorthand and
  Egyptian format scalars, and the tag-plane ranges. CR/LF stay included
  explicitly per GB4/GB5. The measured over-join cases are pinned.
- `InCB=Linker` doc count corrected to 23.
- The generator formats its output with the pinned `rustfmt`, so regeneration
  is byte-identical without a manual `cargo fmt` step.
- The prepend test documents that only a first-row lead is dropped; a
  later-row lead attaches to the previous row's last cell.
- Drive-by: two pre-existing private intra-doc links broke the rustdoc gate on
  main (`SwashSingle` -> `system_db`, `commit_profile_rename` ->
  `PROFILE_RENAME_OVERRIDE`). Both are code spans now; the identical one-line
  fixes ride in #2737, so on a rebase after it lands these hunks are no-ops.
@Xuepoo
Xuepoo force-pushed the ctx-1611/ci-doc-check branch from a0f30eb to 047d89c Compare October 27, 2026 03:50

@Xuepoo Xuepoo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PR-2737 REVIEWER VERDICT: APPROVE

Attribution: independent reviewer subagent (Bitty blitz guard tick, 2026-10-27). Verification: diff inspection + yaml.safe_load of ci.yml; verdict follows.

Verified:

  • Check rustdoc is a required step inside the quality job (shard 1, between fmt and clippy) with RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked; failures propagate (no continue-on-error, no if: always() swallow).
  • Quality gates is a required status check, fail-fast: false matrix requires both shards green.
  • No just ci-local/local-gate duplication in remote CI; rustdoc step reuses shared target dir; --no-deps bounds cost.
  • Two doc-comment fixes (bitty-render/shaped.rs, bitty-terminal/profile.rs) convert private intra-doc links to code spans — the actual class of error the gate enforces.
  • YAML parses cleanly (12 jobs). CI at review time: 18 pass / 0 fail / skipping only event-gated VM tiers.
  • No hardcoded host/env values, bun/toolchain policy respected.

Head sha at verdict: b3fdc56933ef170f8a191e46bcb22a93aca5f5a0. Rebase/head note: CI + approval re-gate on head move.

@Xuepoo
Xuepoo merged commit 87b9b78 into main Oct 27, 2026
31 of 33 checks passed
@Xuepoo
Xuepoo deleted the ctx-1611/ci-doc-check branch October 27, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Area: documentation fix Bug fix P2 Priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ci] Wire just doc-check into the quality gates

1 participant