Skip to content

Add tempo() music block - #400

Merged
aspizu merged 1 commit into
mainfrom
apz/tempo-music-block
Oct 19, 2026
Merged

aspizu merged 1 commit into
mainfrom
apz/tempo-music-block

Conversation

@aspizu

@aspizu aspizu commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Adds tempo() as a zero-argument music reporter that compiles to Scratch's music_getTempo block. Reading the tempo also enables the Music extension.

Adds reporter docs and updates syntax highlighting in VS Code, Notepad++, and the docs.

Validation: cargo check --locked, cargo test --locked (12 tests), and temporary project builds covering stage and sprite reporters, expressions, Music and Pen extension loading, and invalid arguments.

Closes #399

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T11:44:30.448601Z 58c20dd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Walkthrough

The Goboscript block representation and reporter mapping now include the tempo Music reporter. Editor grammars recognize tempo, and the documentation includes its Goboscript and Scratchblocks forms.

Changes: Tempo Reporter

Layer / File(s) Summary
Register the tempo reporter
src/blocks.rs, gdsl.txt
The block representation maps tempo to music_getTempo with no arguments or fields. The reporter mapping associates it with getTempo.
Recognize and document tempo
docs/javascripts/goboscript.tmGrammar.yml, editors/code/syntaxes/goboscript.tmLanguage.json, editors/notepad++/goboscript.udl.xml, docs/language/reporters/music.md, mkdocs.yml
The editor grammars recognize tempo. The Music reporter page documents its Goboscript and Scratchblocks forms and appears in the documentation navigation.

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

Change: Feature

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (6 skipped: 6 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: adding the tempo() music block.
Description check Passed The description directly explains the tempo() reporter, compilation behavior, documentation updates, syntax highlighting changes, and validation performed.
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: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 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

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.98.1)

Clippy execution failed

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔇 Additional comments: 7
src/blocks.rs: 1

1137-1137: LGTM!

Also applies to: 1224-1224, 1266-1266, 1307-1307, 1348-1348, 1389-1389, 1430-1430

gdsl.txt: 1

203-204: LGTM!

docs/javascripts/goboscript.tmGrammar.yml: 1

34-34: LGTM!

editors/code/syntaxes/goboscript.tmLanguage.json: 1

163-163: LGTM!

editors/notepad++/goboscript.udl.xml: 1

34-34: LGTM!

mkdocs.yml: 1

40-40: LGTM!

docs/language/reporters/music.md-3-3: 1

3-3: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Use a level-two heading for tempo.

Music Reporters is a level-one heading, but tempo is level three. Change ### tempo to ## tempo to preserve heading hierarchy and resolve MD001.

Source: Linters/SAST tools


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 479bb1c4-fa4d-4d2f-bb46-2c70e0ee3127
📥 Commits

Reviewing files that changed from the base of the PR and between 90da472 and 58c20dd.

📒 Files selected for processing: 7
  • docs/javascripts/goboscript.tmGrammar.yml
  • docs/language/reporters/music.md
  • editors/code/syntaxes/goboscript.tmLanguage.json
  • editors/notepad++/goboscript.udl.xml
  • gdsl.txt
  • mkdocs.yml
  • src/blocks.rs

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

@aspizu
aspizu merged commit 1efbea9 into main Oct 19, 2026
1 of 2 checks passed
@aspizu
aspizu deleted the apz/tempo-music-block branch October 19, 2026 11:52
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.

tempo() block is missing

1 participant