platform-config-consistency: Platform Config Consistency #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/platform-config-consistency"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Assigned idea
Benchmark authoring specification.
Summary: Add a deterministic Node-based validator for the existing platform configuration so maintainers can catch drift between package metadata, required platform targets, Node image selection, and Windows VM paths before running the full cross-platform flow.
Task intent: Implement ordinary upstream-facing maintenance work for pi-cursor-sdk: create a local validation command for platform-smoke.config.mjs that imports the config and fails fast when the package name, required target matrix, required suite matrix, Ubuntu Node image, Crabbox version, or Windows Parallels work root no longer match the repository's expected pi-cursor-sdk platform configuration.
Benchmark plan: Construct the task package from commit 2b9f6cd3d124292e9ab4dd122b3a121e8e99ed6a. The solver-facing prompt should ask for a small ESM validator, preferably scripts/validate-platform-smoke-config.mjs, that accepts an optional config path argument defaulting to platform-smoke.config.mjs. It must validate the exact requiredTargets values macos, ubuntu, and windows-native; the exact requiredSuites values platform-build, cursor-native-visual-matrix, cursor-bridge-visual-matrix, and cursor-abort-cleanup; packageName pi-cursor-sdk; cursorModel beginning with cursor/; artifactRoot under .artifacts; requiredCrabbox.minVersion at least 0.26.0 using simple semver comparison; ubuntuContainerImage using cimg/node with a major matching nodeValidationMajor; and windowsParallels.workRoot ending in the packageName. The CLI should print a clear success message and exit 0 for the committed config, and print named validation errors with exit 1 for bad configs. Do not require live Crabbox, Parallels, Cursor, or container execution.
Environment plan: Task environment: Node.js 24 is sufficient, no network access or platform-specific services are required, and tests should invoke the validator directly with node. Repository environment: use the materialized pi-cursor-sdk repository at the fixed commit and its existing platform-smoke.config.mjs as the source of truth; do not depend on the Homebrew Crabbox install, Windows VM, Cursor model availability, or the ubuntuContainerImage actually being pulled.
Verifier plan: test_outputs.py should check that the validator file exists at scripts/validate-platform-smoke-config.mjs, run
node scripts/validate-platform-smoke-config.mjs platform-smoke.config.mjs, and expect exit code 0 plus a success phrase. It should then create temporary mutated copies of platform-smoke.config.mjs and run the same command against each copy: change ubuntuContainerImage to cimg/node:23.11 and expect nonzero output naming ubuntuContainerImage and nodeValidationMajor; remove windows-native from requiredTargets and expect nonzero output naming requiredTargets and windows-native; change windowsParallels.workRoot to C:\crabbox\wrong-package and expect nonzero output naming windowsParallels.workRoot and packageName; lower requiredCrabbox.minVersion to 0.25.9 and expect nonzero output naming requiredCrabbox.minVersion. The verifier should not require npm install if node can execute the file directly.Oracle plan: The oracle solution should add scripts/validate-platform-smoke-config.mjs as an ESM script. It should import a config path via pathToFileURL, collect all validation errors before exiting, compare unordered arrays after sorting, parse cimg/node:. with a regular expression, compare the parsed major to nodeValidationMajor, implement dependency-free minimum semver comparison for requiredCrabbox.minVersion, and verify the Windows workRoot suffix after normalizing slash direction. The oracle patch may optionally add a package.json script if package.json already exists, but the direct node command remains the canonical solution path.
Difficulty plan: Current coding agents may fail by only checking that the config imports, by hard-coding success without exercising negative cases, by performing order-sensitive array checks that reject the committed config unnecessarily, by trying to run the real platform matrix instead of static validation, or by using external dependencies that are unavailable in the isolated environment. The Windows path escaping and Node image major-version comparison are likely sources of subtle mistakes.
Repo patch scope: Expected upstream edits are limited to scripts/validate-platform-smoke-config.mjs and, if present and useful, a single package.json script entry pointing to that file. Do not edit platform-smoke.config.mjs values, extension source directories, generated artifacts, or CI platform execution code.
Anti-leakage notes: Solver-facing materials must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present the work only as a normal repository maintenance change for validating the platform configuration.
Approach: Author the prompt so the solver implements a dependency-free Node ESM CLI around the existing config. The implementation should expose reusable validation logic and keep CLI behavior simple: load config, validate invariants derived from platform-smoke.config.mjs, print all errors, and set process.exitCode appropriately.
Verification: Use
node scripts/validate-platform-smoke-config.mjs platform-smoke.config.mjsfor the positive path, then run the same command against temporary mutated config files covering Node image mismatch, missing windows-native target, incorrect Windows workRoot suffix, and too-low Crabbox version; assert exit codes and diagnostic field names.Risk: The main risk is overfitting to exact text replacement in the verifier rather than semantic validation. Mitigate this by mutating temporary config copies in several independent ways and checking named diagnostics instead of full output text. Another risk is requiring package-manager installation; avoid it by using direct node execution.
Path rules: task package is tasks/; mutable upstream checkout is tasks//task/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: platform-config-consistency
Branch: task/platform-config-consistency
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.