readme-package-inventory-check: README Package Inventory Check #1

Open
std-bot wants to merge 1 commit from task/readme-package-inventory-check into main
First-time contributor

Assigned idea

Benchmark authoring specification.

Summary: Add a root-level consistency command that scans packages/*/package.json and fails when README.md's monorepo project list omits or misnames a package, preserving the documented inventory that includes packages/core.

Task intent: Upstream-facing work for this repo: keep the Meshtastic Web monorepo package inventory accurate. README.md says all projects live under packages/ and explicitly lists packages/core as core functionality, so the repo should have a deterministic check that the README package list matches the actual package directories.

Benchmark plan: Construct the task package by asking the solver to add a no-dependency Node.js script at scripts/check-readme-packages.mjs, expose it through the root package.json script check:readme-packages, and update README.md only if the check reveals an actual mismatch at this commit. The visible prompt should frame this as monorepo documentation/tooling maintenance and should not reveal the hidden probe package used by the verifier.

Environment plan: Task/environment: Node.js 20+, corepack/pnpm available, no Meshtastic hardware, browsers, radios, or network services required. Environment/repo: materialize meshtastic/web at commit dbf7f5b18df171db5cf9bbd3ad7bc85de9e02538 and keep the existing repo layout; the solution should use local filesystem reads and avoid adding runtime dependencies.

Verifier plan: test_outputs.py should assert that scripts/check-readme-packages.mjs exists, that package.json exposes check:readme-packages, and that node scripts/check-readme-packages.mjs exits 0 on the submitted repo. It should then copy the repo to a temporary directory, add packages/zz-readme-probe/package.json without changing README.md, rerun node scripts/check-readme-packages.mjs expecting a nonzero exit and an error mentioning packages/zz-readme-probe, append a correctly formatted README bullet for packages/zz-readme-probe, and expect the command to pass.

Oracle plan: The oracle solution is a small plain Node.js script that enumerates direct children of packages/ containing package.json, parses only the README.md section headed Projects within this Monorepo (packages/), extracts backticked paths matching packages/, compares sorted sets, prints missing and stale entries, and exits 1 on mismatch. The oracle also adds the check:readme-packages script to package.json and keeps README.md synchronized if needed.

Difficulty plan: Current coding systems may hard-code the package names already visible in README.md, parse every backticked path in the whole file instead of the intended section, miss stale README entries, or use platform-specific path separators. The hidden temporary package check makes hard-coded or overly narrow implementations fail.

Repo patch scope: Expected edits are limited to scripts/check-readme-packages.mjs, package.json, and README.md if synchronization is actually required. Do not touch packages/web, packages/core implementation files, or transport package source code.

Anti-leakage notes: Solver-facing instructions must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context; present the work only as normal Meshtastic Web monorepo maintenance.

Approach: Implement the check with fs/path APIs, normalize package paths to forward-slash README form, isolate the README package section by heading boundaries, compare actual and documented package path sets, and provide clear diagnostics for missing or stale entries.

Verification: Concrete commands/files: inspect README.md, scripts/check-readme-packages.mjs, and package.json; run corepack enable if needed; run node scripts/check-readme-packages.mjs; run pnpm check:readme-packages; run python3 test_outputs.py /path/to/submitted/repo.

Risk: Main risk is coupling the parser to exact Markdown formatting. Reduce it by matching the documented section heading and backticked packages/ paths rather than fixed line numbers, while still failing clearly if the section is absent.

Path rules: task package is tasks/; mutable upstream checkout is tasks//environment/repo; benchmark package files are under tasks//task; verifier/container environment belongs under tasks//task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest.

Agent context

Task slug: readme-package-inventory-check
Branch: task/readme-package-inventory-check

## Assigned idea Benchmark authoring specification. Summary: Add a root-level consistency command that scans packages/*/package.json and fails when README.md's monorepo project list omits or misnames a package, preserving the documented inventory that includes packages/core. Task intent: Upstream-facing work for this repo: keep the Meshtastic Web monorepo package inventory accurate. README.md says all projects live under packages/ and explicitly lists packages/core as core functionality, so the repo should have a deterministic check that the README package list matches the actual package directories. Benchmark plan: Construct the task package by asking the solver to add a no-dependency Node.js script at scripts/check-readme-packages.mjs, expose it through the root package.json script check:readme-packages, and update README.md only if the check reveals an actual mismatch at this commit. The visible prompt should frame this as monorepo documentation/tooling maintenance and should not reveal the hidden probe package used by the verifier. Environment plan: Task/environment: Node.js 20+, corepack/pnpm available, no Meshtastic hardware, browsers, radios, or network services required. Environment/repo: materialize meshtastic/web at commit dbf7f5b18df171db5cf9bbd3ad7bc85de9e02538 and keep the existing repo layout; the solution should use local filesystem reads and avoid adding runtime dependencies. Verifier plan: test_outputs.py should assert that scripts/check-readme-packages.mjs exists, that package.json exposes check:readme-packages, and that node scripts/check-readme-packages.mjs exits 0 on the submitted repo. It should then copy the repo to a temporary directory, add packages/zz-readme-probe/package.json without changing README.md, rerun node scripts/check-readme-packages.mjs expecting a nonzero exit and an error mentioning packages/zz-readme-probe, append a correctly formatted README bullet for packages/zz-readme-probe, and expect the command to pass. Oracle plan: The oracle solution is a small plain Node.js script that enumerates direct children of packages/ containing package.json, parses only the README.md section headed Projects within this Monorepo (`packages/`), extracts backticked paths matching packages/<name>, compares sorted sets, prints missing and stale entries, and exits 1 on mismatch. The oracle also adds the check:readme-packages script to package.json and keeps README.md synchronized if needed. Difficulty plan: Current coding systems may hard-code the package names already visible in README.md, parse every backticked path in the whole file instead of the intended section, miss stale README entries, or use platform-specific path separators. The hidden temporary package check makes hard-coded or overly narrow implementations fail. Repo patch scope: Expected edits are limited to scripts/check-readme-packages.mjs, package.json, and README.md if synchronization is actually required. Do not touch packages/web, packages/core implementation files, or transport package source code. Anti-leakage notes: Solver-facing instructions must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context; present the work only as normal Meshtastic Web monorepo maintenance. Approach: Implement the check with fs/path APIs, normalize package paths to forward-slash README form, isolate the README package section by heading boundaries, compare actual and documented package path sets, and provide clear diagnostics for missing or stale entries. Verification: Concrete commands/files: inspect README.md, scripts/check-readme-packages.mjs, and package.json; run corepack enable if needed; run node scripts/check-readme-packages.mjs; run pnpm check:readme-packages; run python3 test_outputs.py /path/to/submitted/repo. Risk: Main risk is coupling the parser to exact Markdown formatting. Reduce it by matching the documented section heading and backticked packages/<name> paths rather than fixed line numbers, while still failing clearly if the section is absent. Path rules: task package is tasks/<slug>; mutable upstream checkout is tasks/<slug>/environment/repo; benchmark package files are under tasks/<slug>/task; verifier/container environment belongs under tasks/<slug>/task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest. ## Agent context Task slug: readme-package-inventory-check Branch: task/readme-package-inventory-check <!-- std-ts:idea-pr-body -->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/readme-package-inventory-check:task/readme-package-inventory-check
git switch task/readme-package-inventory-check

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff task/readme-package-inventory-check
git switch task/readme-package-inventory-check
git rebase main
git switch main
git merge --ff-only task/readme-package-inventory-check
git switch task/readme-package-inventory-check
git rebase main
git switch main
git merge --no-ff task/readme-package-inventory-check
git switch main
git merge --squash task/readme-package-inventory-check
git switch main
git merge --ff-only task/readme-package-inventory-check
git switch main
git merge task/readme-package-inventory-check
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
snorkel/root-repository-maintenance-22aa0ee7b8fc4e!1
No description provided.