extensionless-defold-lua-types: Extensionless Defold Lua Types #1

Open
std-bot wants to merge 1 commit from task/extensionless-defold-lua-types into main
First-time contributor

Assigned idea

Benchmark authoring specification.

Summary: Update the Defold Lua template JSON so annotation defaults derive type names from TM_FILENAME_BASE instead of TM_FILENAME, preventing inserted class and self annotations from including the file extension.

Task intent: Improve upstream VS Code Defold Lua template behavior: when a new script or lifecycle callback is inserted, the default annotation type should be the extensionless file name, not the full file name.

Benchmark plan: Construct the work package from astrochili/vscode-defold at commit 066268b887c67a628eb7afc9a5c1c27961ef873a. The solver-facing prompt should ask for the Defold Lua annotation default fix in snippets/defold.json only, with no mention of verifier internals. Add a hidden test_outputs.py that checks the JSON structure and the exact template-variable behavior.

Environment plan: Task environment: a normal checkout of the repo plus Python 3 for the verifier. Repo environment: no VS Code extension host, npm install, or Defold engine run is required because the target behavior is encoded in snippets/defold.json.

Verifier plan: test_outputs.py should parse snippets/defold.json with Python json, traverse the top-level defold entries and their body arrays, assert every line beginning with ---@class or ---@param self uses ${1:${TM_FILENAME_BASE}} rather than ${1:${TM_FILENAME}}, and assert the script file template still contains function init(self), function update(self, dt), function on_message(self, message_id, message, sender), function on_input(self, action_id, action), and function final(self). Run it with python -m pytest test_outputs.py.

Oracle plan: The oracle patch replaces each ${1:${TM_FILENAME}} default used for class and self type annotations in snippets/defold.json with ${1:${TM_FILENAME_BASE}}, preserving placeholder index 1, prefixes, metadata text, ordering, blank lines, tabs, and all lifecycle function signatures.

Difficulty plan: Current coding agents may patch only the first evidenced class line, miss separate lifecycle callback entries later in the same JSON file, or break VS Code placeholder linking by removing the nested ${1:...} structure. They may also make a broad text edit that changes function bodies or invalidates JSON.

Repo patch scope: Expected upstream edit scope is snippets/defold.json only; do not modify package.json, README files, extension source files, syntaxes, or other directories.

Anti-leakage notes: Do not put any solver-facing references to benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context; present only the upstream-facing Defold Lua template change.

Approach: Inspect snippets/defold.json, update the Lua annotation default variable from TM_FILENAME to TM_FILENAME_BASE where it supplies the class or self type, then validate that the file remains valid JSON and lifecycle template text is unchanged.

Verification: Run python -m json.tool snippets/defold.json and python -m pytest test_outputs.py; the pytest file should enforce the annotation variable replacement and preserved lifecycle signatures in snippets/defold.json.

Risk: The main risk is over-constraining unrelated template text or under-constraining the fix so that only the first template entry changes. The verifier should focus on annotation lines and preserved lifecycle signatures to keep the work deterministic.

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: extensionless-defold-lua-types
Branch: task/extensionless-defold-lua-types

## Assigned idea Benchmark authoring specification. Summary: Update the Defold Lua template JSON so annotation defaults derive type names from TM_FILENAME_BASE instead of TM_FILENAME, preventing inserted class and self annotations from including the file extension. Task intent: Improve upstream VS Code Defold Lua template behavior: when a new script or lifecycle callback is inserted, the default annotation type should be the extensionless file name, not the full file name. Benchmark plan: Construct the work package from astrochili/vscode-defold at commit 066268b887c67a628eb7afc9a5c1c27961ef873a. The solver-facing prompt should ask for the Defold Lua annotation default fix in snippets/defold.json only, with no mention of verifier internals. Add a hidden test_outputs.py that checks the JSON structure and the exact template-variable behavior. Environment plan: Task environment: a normal checkout of the repo plus Python 3 for the verifier. Repo environment: no VS Code extension host, npm install, or Defold engine run is required because the target behavior is encoded in snippets/defold.json. Verifier plan: test_outputs.py should parse snippets/defold.json with Python json, traverse the top-level defold entries and their body arrays, assert every line beginning with ---@class or ---@param self uses ${1:${TM_FILENAME_BASE}} rather than ${1:${TM_FILENAME}}, and assert the script file template still contains function init(self), function update(self, dt), function on_message(self, message_id, message, sender), function on_input(self, action_id, action), and function final(self). Run it with python -m pytest test_outputs.py. Oracle plan: The oracle patch replaces each ${1:${TM_FILENAME}} default used for class and self type annotations in snippets/defold.json with ${1:${TM_FILENAME_BASE}}, preserving placeholder index 1, prefixes, metadata text, ordering, blank lines, tabs, and all lifecycle function signatures. Difficulty plan: Current coding agents may patch only the first evidenced class line, miss separate lifecycle callback entries later in the same JSON file, or break VS Code placeholder linking by removing the nested ${1:...} structure. They may also make a broad text edit that changes function bodies or invalidates JSON. Repo patch scope: Expected upstream edit scope is snippets/defold.json only; do not modify package.json, README files, extension source files, syntaxes, or other directories. Anti-leakage notes: Do not put any solver-facing references to benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context; present only the upstream-facing Defold Lua template change. Approach: Inspect snippets/defold.json, update the Lua annotation default variable from TM_FILENAME to TM_FILENAME_BASE where it supplies the class or self type, then validate that the file remains valid JSON and lifecycle template text is unchanged. Verification: Run python -m json.tool snippets/defold.json and python -m pytest test_outputs.py; the pytest file should enforce the annotation variable replacement and preserved lifecycle signatures in snippets/defold.json. Risk: The main risk is over-constraining unrelated template text or under-constraining the fix so that only the first template entry changes. The verifier should focus on annotation lines and preserved lifecycle signatures to keep the work deterministic. 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: extensionless-defold-lua-types Branch: task/extensionless-defold-lua-types <!-- 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/extensionless-defold-lua-types:task/extensionless-defold-lua-types
git switch task/extensionless-defold-lua-types

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/extensionless-defold-lua-types
git switch task/extensionless-defold-lua-types
git rebase main
git switch main
git merge --ff-only task/extensionless-defold-lua-types
git switch task/extensionless-defold-lua-types
git rebase main
git switch main
git merge --no-ff task/extensionless-defold-lua-types
git switch main
git merge --squash task/extensionless-defold-lua-types
git switch main
git merge --ff-only task/extensionless-defold-lua-types
git switch main
git merge task/extensionless-defold-lua-types
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-211720333dcd47!1
No description provided.