feat: modernize Sol cheatsheet PDF - #50
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new PDF renderer has a few brittle failure modes (cryptic StopIteration/KeyError on heading drift and locale-dependent Markdown decoding) that should be hardened before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR modernizes the Sol cheatsheet by updating the Markdown content to match solx v1.0.3 behavior and introducing a new, pinned uv + ReportLab-based renderer to generate a reproducible, two-page landscape PDF from the shared Markdown source.
Changes:
- Redesign and refresh
skills/sol-skill/references/cheatsheet.mdcontent (routing/QOS, workflow,solx keepdetails, and operational guidance). - Replace the Pandoc/LaTeX PDF build with a new
scripts/render-cheatsheet.pyReportLab renderer invoked viauvinscripts/build-cheatsheet.sh. - Update Rust cheatsheet tests to assert presence of newly documented v1.0.3
keepbehaviors/counters.
File summaries
| File | Description |
|---|---|
| solx/src/cheatsheet.rs | Extends the cheatsheet content test to cover new v1.0.3 keep documentation strings. |
| skills/sol-skill/references/cheatsheet.md | Rewrites/expands the cheatsheet Markdown to match current solx behavior and updated Sol guidance. |
| scripts/render-cheatsheet.py | Adds a new uv-scripted Markdown→PDF renderer using ReportLab with a card-based layout. |
| scripts/build-cheatsheet.sh | Switches the build pipeline to uv run --script and injects the solx version into the renderer. |
| .gitignore | Ignores local workflow scratch output under docs/PR/. |
Review details
Suppressed comments (2)
scripts/render-cheatsheet.py:416
make_story()similarly assumes the troubleshooting heading is present; missing/renamed headings will currently crash withStopIteration. Converting this to a descriptiveRuntimeErrormakes failures actionable when the Markdown evolves.
diagnose_index = next(
index
for index, section in enumerate(sections)
if section.title == "Job stuck PENDING? Diagnose before rerouting"
)
scripts/render-cheatsheet.py:553
- For reproducible builds, avoid locale-dependent defaults when reading the Markdown source;
Path.read_text()without an explicit encoding can vary across environments. Reading as UTF-8 makes the renderer deterministic.
intro, sections = parse_markdown(source.read_text())
- Files reviewed: 4/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
solx cheatsheetreference with the complete solx v1.0.3 behaviorVerification
scripts/build-cheatsheet.shkeepfieldscargo test --lockedfromsolx/(110 unit + 40 CLI tests)Palette reference: ASU Enterprise Brand Guide
Routing reference: ASU RC Partitions and QoS
Closes #49