Skip to content

Skip codegen locks in workspace checks - #1263

Merged
dahlia merged 1 commit into
fedify-dev:2.4-maintenancefrom
dahlia:bugfix/vocab-codegen-lock
Oct 6, 2026
Merged

dahlia merged 1 commit into
fedify-dev:2.4-maintenancefrom
dahlia:bugfix/vocab-codegen-lock

Conversation

@dahlia

@dahlia dahlia commented Oct 6, 2026

Copy link
Copy Markdown
Member

mise check can fail intermittently when vocab codegen removes .vocab-codegen.lock after the workspace checker discovers it but before it reads the directory. Exclude this temporary lock from traversal so the checker never tries to read it after codegen removes it.

Regression tests force the lock to disappear before the checker enters the directory and verify that real package.json files are still found. Both new tests fail without the exclusion. Validated with seven focused Deno tests and mise run check.

The workspace protocol walk can see the vocabulary codegen lock just
before codegen removes it, causing intermittent NotFound failures in
mise check. Exclude this temporary directory from the walk.

Extract the manifest walk for deterministic regression tests covering
existing and disappearing locks while preserving real manifest discovery
and the checker's command-line behavior.

Changelog: none
Assisted-by: Codex:gpt-6.1-sol
@dahlia dahlia self-assigned this Oct 6, 2026
@dahlia dahlia added the component/build Build system and packaging label Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 2d1dc77b-bd66-4153-a06f-2becee33b0c7
📥 Commits

Reviewing files that changed from the base of the PR and between 09a41ad and 8075d1b.

📒 Files selected for processing (2)
  • scripts/check_workspace_protocol.test.ts
  • scripts/check_workspace_protocol.ts

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


📝 Walkthrough

Walkthrough

The workspace protocol check now exposes a package manifest traversal helper, skips codegen lock paths, and runs validation only when invoked as the main module. Tests cover lock-directory exclusion and removal during traversal.

Changes

Workspace protocol check

Layer / File(s) Summary
Manifest traversal and tests
scripts/check_workspace_protocol.ts, scripts/check_workspace_protocol.test.ts
The exported walkPackageManifests helper skips node_modules, .git, and .vocab-codegen.lock. Tests verify that traversal skips the lock directory and continues if it is removed during iteration.
Main-module validation
scripts/check_workspace_protocol.ts
The validation runs only when the script is the main module. It checks yielded manifests and reports dependency specs exactly equal to workspace:.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 8075d

This change stops the workspace protocol check from failing intermittently when codegen removes a temporary lock during traversal. Real package manifests are still found, and no merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: excluding codegen locks from workspace checks.
Description check ✅ Passed The description explains the traversal issue, the lock exclusion, the regression tests, and reported validation.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · 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.

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.36364% with 39 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
scripts/check_workspace_protocol.ts 11.36% 38 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
scripts/check_workspace_protocol.ts 28.12% <11.36%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dahlia
dahlia merged commit 064a979 into fedify-dev:2.4-maintenance Oct 6, 2026
21 of 22 checks passed
@dahlia
dahlia deleted the bugfix/vocab-codegen-lock branch October 6, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/build Build system and packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant