Skip to content

std coverage: ulid and uuid docs, examples, tests - #3652

Merged
BaseMax merged 3 commits into
mainfrom
fix/uuid-ulid-coverage
Nov 18, 2026
Merged

BaseMax merged 3 commits into
mainfrom
fix/uuid-ulid-coverage

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

main is red on the "Std symbols have Persian names, tests and docs" check since #3649 and #3650 (97 new gaps, 5 stale baseline lines). This fixes it for real, without baselining the new symbols.

  • website ex. keys in en and fa for every ulid symbol and the uuid fields (ULID.time/hi/lo, Result., Generator., ERR_, ParseResult., UUID.hi/lo/to_str)
  • doc.UUID.to_str in en and fa
  • three new ulid examples (New, Bytes, Errors) and one uuid example (Buffer), en and fa, each with a checked .out
  • new tests tests/{en,fa}/stdlib/uuid_buffer for ToBuffer, FromBuffer and to_str
  • ToBuffer and FromBuffer ex keys now point at the new Buffer example
  • five baseline lines removed: pool ParallelFor, str Compare, time Duration.Cmp, NowMillis, NowNanos

Checked locally with a main-built compiler: salam run tools/salam/check-std-coverage-docs.salam now prints "214 packages, 20920 public symbols, 14439 known gaps" with no new gaps, and all new examples pass website/check-example.sh.

Example (encoding-uuid-Buffer):

uuid.ToBuffer(id, buf)
back := uuid.FromBuffer(buf)
println back.to_str()   // f81d4fae-7dec-11d0-a765-00a0c91e6bf6

Summary by CodeRabbit

  • Documentation
    • Added English and Persian examples covering ULID creation, parsing, byte conversions, comparisons, and errors.
    • Expanded UUID documentation and examples for string formatting, buffer conversions, and UUID fields.
  • Tests
    • Added English and Persian test coverage for UUID buffer round-trips and comparisons.

@BaseMax
BaseMax requested a review from a team as a code owner November 18, 2026 17:06
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds English and Persian UUID and ULID examples, updates standard-library documentation mappings, adds UUID buffer tests, and removes five Persian entries from the standard-library coverage baseline.

Changes: UUID and ULID examples

Layer / File(s) Summary
ULID examples and documentation mappings
website/content/{en,fa}/std-examples/encoding-ulid/*, website/content/{en,fa}/std/187-encoding-ulid.txt
Adds localized examples for ULID creation, errors, and byte conversions. The documentation maps ULID entities and fields to examples.
UUID buffer examples, tests, and mappings
tests/{en,fa}/stdlib/uuid_buffer.salam, website/content/{en,fa}/std-examples/encoding-uuid/encoding-uuid-Buffer.salam, website/content/{en,fa}/std/186-encoding-uuid.txt
Adds localized UUID buffer round-trip examples and tests. Updates UUID documentation for to_str and mappings for buffer and parse entities.

Coverage baseline

Layer / File(s) Summary
Remove covered entries
tools/salam/std-coverage-docs-baseline.txt
Removes the Persian untested-fa entries for `pool

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

  • SalamLang/Salam#3651: Updates documentation, examples, tests, and coverage-baseline entries for the same standard-library coverage check.

Suggested reviewers: bdadmehr0, erfangnu

Merge Risk: Minimal · up to 6ea77

This change adds UUID and ULID documentation examples, tests and coverage baseline cleanup. No behavioral risk to production code is evident, so it looks ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "std coverage: ulid and uuid docs, examples, tests" names the main change: ULID and UUID documentation, examples, and tests added to close std coverage gaps. The raw summary confirms new ULI…
Description check Passed The description follows the template's main sections. It explains the purpose (fixing the red 'Std symbols have Persian names, tests and docs' check without baselining new symbols) and lists the propo…
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.
Full details: Title check

Explanation

The title "std coverage: ulid and uuid docs, examples, tests" names the main change: ULID and UUID documentation, examples, and tests added to close std coverage gaps. The raw summary confirms new ULID and UUID examples, website doc keys, and uuid_buffer tests in both en and fa. The title omits the baseline removals, which is acceptable because it need not cover every detail.

Full details: Description check

Explanation

The description follows the template's main sections. It explains the purpose (fixing the red 'Std symbols have Persian names, tests and docs' check without baselining new symbols) and lists the proposed changes: website ex. keys, doc.UUID.to_str, three ULID examples and one UUID example in en and fa, new uuid_buffer tests, and five removed baseline lines. It includes local test evidence with the check command and an example. Missing items: the 'Related Issue' section does not reference an issue (it cites PRs #3649 and #3650 only in prose), and the checklist is not ticked. These gaps are non-critical, so the description is mostly complete.

Finishing Touches

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 703060aa-1333-4761-beda-50331b245762
Commits

Reviewing files that changed from the base of the PR and between ea7f098 and 6ea773b.

Files ignored due to path filters: 10

  • tests/en/stdlib/uuid_buffer.out is excluded by !**/*.out
  • tests/fa/stdlib/uuid_buffer.out is excluded by !**/*.out
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-Bytes.out is excluded by !**/*.out
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-Errors.out is excluded by !**/*.out
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-New.out is excluded by !**/*.out
  • website/content/en/std-examples/encoding-uuid/encoding-uuid-Buffer.out is excluded by !**/*.out
  • website/content/fa/std-examples/encoding-ulid/encoding-ulid-Bytes.out is excluded by !**/*.out
  • website/content/fa/std-examples/encoding-ulid/encoding-ulid-Errors.out is excluded by !**/*.out
  • website/content/fa/std-examples/encoding-ulid/encoding-ulid-New.out is excluded by !**/*.out
  • website/content/fa/std-examples/encoding-uuid/encoding-uuid-Buffer.out is excluded by !**/*.out
Files selected for processing: 15

  • tests/en/stdlib/uuid_buffer.salam
  • tests/fa/stdlib/uuid_buffer.salam
  • tools/salam/std-coverage-docs-baseline.txt
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-Bytes.salam
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-Errors.salam
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-New.salam
  • website/content/en/std-examples/encoding-uuid/encoding-uuid-Buffer.salam
  • website/content/en/std/186-encoding-uuid.txt
  • website/content/en/std/187-encoding-ulid.txt
  • website/content/fa/std-examples/encoding-ulid/encoding-ulid-Bytes.salam
  • website/content/fa/std-examples/encoding-ulid/encoding-ulid-Errors.salam
  • website/content/fa/std-examples/encoding-ulid/encoding-ulid-New.salam
  • website/content/fa/std-examples/encoding-uuid/encoding-uuid-Buffer.salam
  • website/content/fa/std/186-encoding-uuid.txt
  • website/content/fa/std/187-encoding-ulid.txt
Files with no reviewable changes: 1

  • tools/salam/std-coverage-docs-baseline.txt

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

@github-actions

Copy link
Copy Markdown
Contributor
sha=6ea773bc0a1f678930cf7b86ebe778268346ba7a

🤖 Salam AI review

Verdict: 🛠️ Changes needed before merging

commit 6ea773b · 25 files · +341 −9 · model salam

Summary

This pull request adds English and Persian stdlib coverage for encoding.uuid and encoding.ulid by introducing new tests, website examples with checked outputs, and updated doc/example key mappings, while also removing five stale baseline entries. The changes are focused and consistent across languages, and they align with the stated goal of resolving the std coverage docs gaps without adding new baselines. From the diff, the content appears coherent, but there is at least one convention issue in the added Salam sources that should be confirmed or fixed.

What changed

  • Added tests/en/stdlib/uuid_buffer.salam and tests/fa/stdlib/uuid_buffer.salam with matching .out files to exercise ToBuffer, FromBuffer, UUID.hi/lo, and to_str behavior.
  • Added new website examples for ULID (New, Bytes, Errors) and UUID (Buffer) in both English and Persian, each with .salam and .out files.
  • Updated website/content/{en,fa}/std/186-encoding-uuid.txt and 187-encoding-ulid.txt to document UUID.to_str and wire ex.* keys (including ToBuffer/FromBuffer, result/field symbols, and ULID generator/error symbols) to the new examples; removed five stale entries from tools/salam/std-coverage-docs-baseline.txt.

Review

  • tests/en/stdlib/uuid_buffer.salam:1, website/content/en/std-examples/encoding-ulid/encoding-ulid-New.salam:1, encoding-ulid-Bytes.salam:1, encoding-ulid-Errors.salam:1, website/content/en/std-examples/encoding-uuid/encoding-uuid-Buffer.salam:1: all added English Salam source files start with import rather than a language header, while the added Persian sources start with // زبان: فارسی. If the repository requires every source file to begin with // lang: en or // زبان: فارسی, these files should be updated for consistency and to satisfy that convention.
  • tools/salam/std-coverage-docs-baseline.txt: the removed entries (untested-fa|pool|ParallelFor, untested-fa|str|Compare, untested-fa|time|Duration.Cmp, untested-fa|time|NowMillis, untested-fa|time|NowNanos) are presented as stale gaps, but this diff does not show corresponding new tests/docs/examples for them. Can you confirm these are now covered elsewhere on main/in this branch state rather than simply unbaselined here?

Tests

  • The PR adds deterministic-looking .out fixtures alongside the new stdlib tests and website examples, which is appropriate for coverage and documentation checks.
  • No build or test run was performed as part of this review; the reported local check-std-coverage-docs.salam and website/check-example.sh results were not independently verified here.

Risks

  • If English Salam sources are expected to carry // lang: en, the new files could fail style/coverage/tooling checks that enforce file headers.
  • Incorrectly dropping baseline entries without actual coverage elsewhere would leave the std coverage check red; this depends on repository state outside what can be concluded from the diff alone.

⚠️ This review was written automatically by an AI and may contain mistakes. It is a helper for maintainers, not a replacement for a human review: check the code yourself before merging.

@BaseMax
BaseMax merged commit 74d575a into main Nov 18, 2026
14 checks passed
@BaseMax
BaseMax deleted the fix/uuid-ulid-coverage branch November 18, 2026 17:27
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