Skip to content

fix(examples): restore Markdown example pages lost in AsciiDoc migration - #25

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/restore-example-markdown
Oct 13, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
fix/restore-example-markdown

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Commit bb2e421 ("refactor: migrate Markdown to AsciiDoc (#17)") renamed examples/index.md and examples/about.md to .adoc and converted them. That broke the sample site in two ways:

  • Ddraig only builds .md/.markdown sources (isMarkdown in Ddraig.idr), so ddraig build examples _site found zero pages. The CI build job then uploaded an essentially empty _site as the GitHub Pages artifact.
  • The converter mangled the YAML front matter into a bogus == heading followed by a single run-on paragraph (title: Ddraig site: Ddraig description: ... date: 2026-06-22 —).

These files are test fixtures for a Markdown static-site generator, not project documentation, so they must stay Markdown. Restore both from bb2e421^ byte-for-byte (including the CC-BY-SA-4.0 SPDX comment, which parseFrontmatter skips as a single leading HTML comment) and remove the broken .adoc copies.

The restored pages satisfy the O3 build-time certification (certify in Attest.idr): index.md has headings h1, h2, h2 and about.md has a single h1, so each has exactly one

and no skipped levels.

Summary

Closes #

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (would change existing behaviour)
  • 🕳️ Soundness fix (fixes a checker/proof false-negative)
  • 📖 Documentation
  • 🧹 Refactor / tech debt (behaviour-preserving)
  • ⚡ Performance
  • 🔧 Build / CI / tooling

How has this been verified?

Checklist

  • My commits are signed (git commit -S).
  • I ran the project's own checks/tests locally and they pass.
  • New files carry the correct SPDX-License-Identifier (code/config MPL-2.0,
    prose CC-BY-SA-4.0); I did not relicense existing files.
  • Docs are updated, and no public claim now overstates what the code does.
  • I have not introduced a soundness hole (or I have flagged where I might have).

Notes for reviewers

Commit bb2e421 ("refactor: migrate Markdown to AsciiDoc (#17)") renamed
examples/index.md and examples/about.md to .adoc and converted them. That
broke the sample site in two ways:

- Ddraig only builds `.md`/`.markdown` sources (`isMarkdown` in Ddraig.idr),
  so `ddraig build examples _site` found zero pages. The CI `build` job then
  uploaded an essentially empty `_site` as the GitHub Pages artifact.
- The converter mangled the YAML front matter into a bogus `== ` heading
  followed by a single run-on paragraph
  (`title: Ddraig site: Ddraig description: ... date: 2026-06-22 —`).

These files are test fixtures for a Markdown static-site generator, not
project documentation, so they must stay Markdown. Restore both from
bb2e421^ byte-for-byte (including the CC-BY-SA-4.0 SPDX comment, which
`parseFrontmatter` skips as a single leading HTML comment) and remove the
broken .adoc copies.

The restored pages satisfy the O3 build-time certification (`certify` in
Attest.idr): index.md has headings h1, h2, h2 and about.md has a single h1,
so each has exactly one <h1> and no skipped levels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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 40 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
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0b99ad60-502d-4d4a-9fe7-7b949a084321
📥 Commits

Reviewing files that changed from the base of the PR and between 082bb68 and 5ac0449.

📒 Files selected for processing: 1
  • .github/workflows/ci.yml

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c7b6e48b-e551-4166-8548-3440af85d927
📥 Commits

Reviewing files that changed from the base of the PR and between b5887fb and 082bb68.

📒 Files selected for processing: 4
  • examples/about.adoc
  • examples/about.md
  • examples/index.adoc
  • examples/index.md
💤 Files with no reviewable changes: 2
  • examples/index.adoc
  • examples/about.adoc

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

📜 Recent review details
⏰ Context from checks skipped due to timeout: 10
  • GitHub Check: pipeline / Secret scanning / gitleaks
  • GitHub Check: pipeline / SAST (semgrep)
  • GitHub Check: pipeline / Secret scanning / rust-secrets
  • GitHub Check: pipeline / Secret scanning / shell-secrets
  • GitHub Check: pipeline / Detect ecosystems
  • GitHub Check: scan / shell-secrets
  • GitHub Check: scan / gitleaks
  • GitHub Check: scan / rust-secrets
  • GitHub Check: test
  • GitHub Check: semgrep-cloud-platform/scan
🧰 Additional context used
🪛 LanguageTool
examples/index.md

[uncategorized] ~5-~5: The hyphen in dependently-typed is redundant.
Context: ...tle: Ddraig site: Ddraig description: A dependently-typed static-site generator written in Idris ...

(ADVERB_LY_HYPHEN_FIX)

🪛 markdownlint-cli2 (0.23.3)
examples/about.md

[warning] 2-2: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

[warning] 3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)

[warning] 9-9: Heading style
Expected: setext; Actual: atx

(MD003, heading-style)

examples/index.md

[warning] 2-2: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

[warning] 3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)

[warning] 9-9: Heading style
Expected: setext; Actual: atx

(MD003, heading-style)

[warning] 15-15: Heading style
Expected: setext; Actual: atx

(MD003, heading-style)

[warning] 23-23: Heading style
Expected: setext; Actual: atx

(MD003, heading-style)

🔇 Additional comments: 2
examples/about.md: 1

1-12: LGTM!

examples/index.md: 1

1-30: LGTM!

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Added Markdown versions of the examples site’s introduction and getting-started guide, including a feature overview, Idris 2 code example, build instructions and links to further information.

The example guide and landing page now use Markdown files. The corresponding AsciiDoc pages were removed. The Markdown pages include site metadata and their respective instructions or landing-page content.

Changes: Example site pages

Layer / File(s) Summary
Replace the AsciiDoc pages with Markdown
examples/about.adoc, examples/about.md, examples/index.adoc, examples/index.md
The getting-started guide and landing page were added as Markdown pages with site metadata. The original AsciiDoc pages were removed.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 082bb

The example pages are included in the build and the landing-page link reaches the guide; no merge-blocking risk is identified.

### Architecture Summary

Architecture risk: 🔵 Low · up to 082bb

The change affects 1 system.

Changed systems: examples

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — examples (service) was modified; 4 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in examples/about.adoc: The examples/about.adoc file, including its “Getting started” title, site metadata and compile/build instructions, was removed.
  • observed — Modified behavior in examples/about.md: Added an SPDX licence identifier, page metadata (title, site, description and date), and compile and build instructions.
  • observed — Modified behavior in examples/index.adoc: The examples/index.adoc page was removed, including its site metadata, Ddraig introduction, accessibility claim, feature matrix, Idris example and links.
  • observed — Modified behavior in examples/index.md: Added the complete Ddraig landing page, including site metadata, an introduction, a theme accessibility claim, a Markdown feature matrix, an Idris 2 main example, and links to project documentation.
Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: restoring the Markdown example pages and removing the broken AsciiDoc migration.
Description check Passed The description directly explains the migration problem, the required restoration, and the expected build and certification impact. It is related to the changeset.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🛠️ Fix failing CI checks
  • 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

A rabbit hops through Markdown pages,
With build steps set in tidy stages.
A feature chart, an Idris show,
And site details help readers know.
The old pages rest; new files take their place.

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

@hyperpolymath
hyperpolymath enabled auto-merge (squash) October 13, 2026 20:44
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Add Carrot credits or activate Agent usage billing to use Autofix

Every `build` job since run #43 (2026-09-22) has failed at "Set up job",
before any step runs, with:

  The action actions/upload-artifact@v4 is not allowed in
  hyperpolymath/ddraig-ssg because all actions must be pinned to a
  full-length commit SHA.

The pinned upload-pages-artifact v3.0.1 is a composite action that calls
`actions/upload-artifact@v4` by tag. The SHA-pin policy also applies to
those nested actions, so it rejects the job. The `test` job is unaffected
and still passes. The last green build was run #42 (2026-09-03), so the
policy was switched on between those runs; ci.yml did not change.

v5.0.0 pins its inner upload-artifact to a SHA (v7.0.0). Since v4,
upload-pages-artifact excludes dotfiles by default, which would silently
drop .well-known/accessibility-attestation.json (the O3 attestation) from
the Pages artifact, so set include-hidden-files: true to keep v3's
behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

ℹ️ No failing CI checks found.

No CI/CD pipeline failures were detected for the current commit. If other checks (security scans, code quality, etc.) are failing, those require separate attention.

@hyperpolymath
hyperpolymath merged commit 6dd0b09 into main Oct 13, 2026
21 of 22 checks passed
@hyperpolymath
hyperpolymath deleted the fix/restore-example-markdown branch October 13, 2026 21:17
hyperpolymath added a commit that referenced this pull request Oct 13, 2026
#25 restored the Markdown example pages, so the drafts' statements that
examples/ builds no pages are out of date.

- FEEDS.adoc: the CI build job's feed now has entries; it is still
  published to Pages unchecked.
- test-static.sh: also require byte-identical builds of examples/; the
  generated fixture stays for the nested page, draft and extra Markdown.
- RELEASING.adoc: describe both sites, and record the repository's
  SHA-pin policy (which also checks a composite action's inner actions).
  All four actions in release.yml are JavaScript actions, which is why
  it calls actions/attest directly rather than the composite
  attest-build-provenance v4 wrapper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hyperpolymath added a commit that referenced this pull request Oct 13, 2026
…ilestones 4, 5, 10) (#26)

<!--
SPDX-License-Identifier: CC-BY-SA-4.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
## Summary

Drafts for three work package 2 milestones that don't depend on work
package 1's code. No Idris code changes.

- **`SEARCH-INDEX.adoc` (milestone 4)** specifies version 1 of a static
JSON search index:
- what is indexed, normative tokenisation and the 33-word English stop
list;
- integer field weights, file structure with fixed key order, and JSON
escaping;
- a deterministic size-limit rule, a worked example and a stability
policy.

It is off by default, and has no timestamp, so identical sources give an
identical file.
- **`FEEDS.adoc` (milestone 5)** first records exactly what today's Atom
feed does, including its defects. No current test generates a feed, so
milestone 5 must start by golden-testing it. It then defines one feed
item model for Atom, RSS 2.0 and JSON Feed 1.1, with a consumer contract
for superfeedreader. Every Atom change is marked as an intended
golden-test diff.
- **`.github/workflows/release.yml` (milestone 10)**, with
`.github/scripts/*.sh` and `RELEASING.adoc`. On a `vX.Y.Z` tag it builds
a fully static x86_64 Linux binary and publishes it with a SHA-256
checksum and a signed provenance attestation. Before publishing, it runs
the same verification commands users are given. `workflow_dispatch`
builds and tests only.

**Status: draft, nothing here has executed.** These were written on a
machine without a Linux Idris 2 toolchain. The specs are not
implemented. The release workflow has never run, and needs the fork
dry-run described in `RELEASING.adoc` before anyone pushes a release tag
upstream. Items marked _(WP1)_ in the docs are provisional until work
package 1 is merged.

Closes # (none: work package 2 has no issue)

## Type of change

- [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
- [ ] ✨ New feature (non-breaking change that adds functionality)
- [ ] 💥 Breaking change (would change existing behaviour)
- [ ] 🕳️ Soundness fix (fixes a checker/proof false-negative)
- [x] 📖 Documentation
- [ ] 🧹 Refactor / tech debt (behaviour-preserving)
- [ ] ⚡ Performance
- [x] 🔧 Build / CI / tooling

## How has this been verified?

Commands actually run (Windows, Git Bash; no Idris 2 or Linux
available):

- `bash --posix -n` on all three scripts: no errors.
- `test-static.sh` against stub binaries: it passes when the two
binaries agree. It fails, as intended, when:
  - a subcommand's output differs;
  - a draft page gets built;
  - the static build of `examples/` fails;
  - the large-page build crashes;
  - it is called without arguments.
- `check-idris-version.sh` with a fake `idris2`:
  - accepts `0.8.0-6ca00e72e`, `0.8.0` and `0.10.1`;
  - rejects `0.7.0` and unparseable output.
- `build-static.sh`'s toolchain check against fake image layouts. It
passes on the matching layout and stops with a clear message when:
  - the version string names another commit;
  - the version string has no commit hash;
  - a header differs or is missing;
  - there are two version directories.
- The pinned toolchain was read, not run:
- Idris 2 0.8.0 at `6ca00e72` on Ubuntu 24.04, from the image's manifest
and layers;
  - the Zig 0.16.0 checksum from `ziglang.org/download/index.json`;
- the GMP 6.3.0 tarball checksum, computed from both gmplib.org and
ftp.gnu.org;
  - action SHAs from `git ls-remote`.
- An independent review recomputed the search-index example and checked
the "current Atom" description against `Ddraig.idr`. All its findings
are fixed.

**Not verified:**
- the workflow YAML (no linter here);
- every real build step: Zig, GMP, RefC, the musl runtimes, linking;
- the attestation and release steps.

## Checklist

- [ ] My commits are **signed** (`git commit -S`). *No signing key on
the machine these were made on. If unsigned commits can't be merged
here, squash-merging on GitHub creates a signed commit.*
- [ ] I ran the project's own checks/tests locally and they pass. *Not
possible without Idris 2; see above. No Idris code changed, so the
existing CI checks still apply as before.*
- [x] New files carry the correct `SPDX-License-Identifier` (code/config
`MPL-2.0`,
      prose `CC-BY-SA-4.0`); I did not relicense existing files.
- [x] Docs are updated, and no public claim now overstates what the code
does. *Every new document opens by saying it is a draft, and what is
untested.*
- [x] I have not introduced a soundness hole (or I have flagged where I
might have). *No Idris code changed.*

## Notes for reviewers

**How the static binary is built.** The Chez backend can't produce a
single static binary, because it needs the Chez runtime. So the release
uses Idris 2's **RefC** backend, compiled with **`zig cc` against
musl**, with GMP and the Idris 2 C runtimes rebuilt for musl. CI tests
the Chez build, so `test-static.sh` requires both builds to give
byte-identical output on:
- every test subcommand;
- `examples/` and a generated fixture site;
- a large page.

**Risks to watch in the dry-run** (all listed in `RELEASING.adoc`):
- the fixed C stack versus Chez's growable one on large pages;
- whether the Idris 2 C runtimes compile for musl (`getline.c` may clash
with musl's own definitions);
- whether pack's `idris2 --version` carries the commit hash. The build
fails closed if not.

**Pins.**
- Every action is pinned to a commit SHA, and all four are JavaScript
actions with no inner actions, so they meet the SHA-pin policy noted in
`ci.yml`.
- The build container uses the same image digest as `ci.yml`; bump both
together.

**Found in the existing code, not changed here:**
- The inline parser's `splitOnStr` re-packs the rest of the paragraph at
every delimiter, so a long paragraph costs quadratic time.
- `jsonEsc` escapes only `"`, `\` and newline, so a tab can produce
invalid JSON.
- `copyTree` copies assets through `readFile`/`writeFile` as text. That
likely corrupts binary files such as images (not tested), which matters
for milestones 1 and 2.

Merged with `main` after #25, and updated for it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@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.

1 participant