Keep the repository directory names in one place, stop shipping AGENTS.md - #20
Merged
Merged
Conversation
…of copying The directory names a sibling checkout can carry were written twice: here in lib/repos.mjs and again, by hand, in the VS Code extension's src/repolayout.ts. Nothing gated the two against each other, so the next repository rename would have landed in one of them and half-worked - the MCP server finding a checkout the editor does not, or the other way round. lib/repo-dirs.json is now the single source: per repo the directory names (newest first), the env vars that override the guess, and the probe file that proves a candidate really is that checkout. repos.mjs reads it; the constants it exports are views on the JSON rather than literals, so every caller and the existing test keep working unchanged. The extension snapshots the same file with a drift gate, the way it already does for app-template and the client API. Co-Authored-By: Claude <noreply@anthropic.com>
lib/scaffold.mjs carried its own TEMPLATE_FILES and its own substitution rules - a second answer to "what does a new project look like", next to the template's own scripts/rename.mjs and the VS Code extension's scaffold. The lists had already drifted: this one omitted .gitignore, so a scaffolded project committed node_modules, and it left package.json's name at "abap2ui5-app" while `npm run rename` rewrote it. app-template now describes itself in template.json. scaffold() reads it out of the checkout and executes it; a checkout without the file is reported (scaffold_app says to pull) rather than falling back to a guess, because the guess is the copy this removes. Co-Authored-By: Claude <noreply@anthropic.com>
…ibed The VS Code extension's own MCP server renamed its `run_app` to `run_app_on_system`, because both servers are registered in one window and the two tools mean different things - this one builds and boots the transpiled sandbox, that one runs a class on a real system. The README's forward-looking note still called it `run_app_system` and read as unbuilt; it exists, and the reason for its name is worth having here. Co-Authored-By: Claude <noreply@anthropic.com>
files[] handed AGENTS.md to every npm installer, on the reasoning that an agent could read the contract of the thing it is driving. It cannot: that file is written for an agent working ON this repository - how to build and verify it, which sibling checkouts the server writes into, which maintenance traps not to walk into again. An agent driving the server gets the tool descriptions over the protocol and the README. The server never reads it at runtime, so nothing else changes. RELEASING.md's tarball inventory says so instead of describing the old one. Co-Authored-By: Claude <noreply@anthropic.com>
Same two lines as abap2UI5/samples, plus the commands to run and the two things a contributor here trips over first: this repo cannot work alone, and a missing sibling checkout is an actionable message rather than a crash. Co-Authored-By: Claude <noreply@anthropic.com>
repos.mjs said the sample catalogue holds 152 apps and samples-controls 416 ports; examples.mjs said 430 ports and 614 apps. An audit across the ecosystem found the same two figures written five different ways, all of them measurements somebody took once. The sizes are not what these comments are for - they explain why the two repositories are separate and why the catalogue parser is shaped the way it is, and both arguments hold at any size. Each repository publishes its current count in a generated file, which is the copy that cannot be wrong. The parser note keeps its numbers because it describes a bug that happened, and says so: a dated finding gets old rather than false. Co-Authored-By: Claude <noreply@anthropic.com>
… sibling CI went red on a test that passes locally. `a template missing a file reports it rather than shipping a shorter project` copies the real `template.json` out of app-template - deliberately, so the fixture cannot become the second copy of the file list this change removed - but unlike the two scaffold tests next to it, it did not check that the sibling is there. On a runner that checks out this repository alone, `cpSync` threw ENOENT and took the whole file down with it. It skips now, the same way and with the same message as its neighbours. The smoke job is the other half. It clones the siblings this server orchestrates and then runs the full test file - but it cloned only samples-controls and linter, so all three scaffold tests skipped themselves there. app-template is just as much a sibling this server reads: scaffold_app serves its files and executes its template.json. It is cloned now, so the smoke job actually covers what its name claims. Verified both ways: with the sibling present 44 pass, without it 41 pass and 3 skip - no failures either way. Co-Authored-By: Claude <noreply@anthropic.com>
Cloning app-template into the smoke job turned one failure into two, and the reason is worth writing down: the three scaffold tests guarded on `abaplint.jsonc`, but since the file list and the substitutions moved into `template.json`, that is the file `scaffold()` needs. Before the clone there was no sibling at all and all three skipped; after it there was a sibling whose main does not carry `template.json` yet, so two of them started and then failed on a file that was not there. A checkout that predates `template.json` is exactly that case - present, and still unable to serve these tests. All three now say so with the same message. Once app-template#12 lands they stop skipping and start proving something, in this repository and in anybody's local checkout. Verified in the shape that broke CI: a sibling without `template.json` gives 41 pass and 3 skips, no failures; with it, 44 pass. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of an ecosystem-wide audit of the abap2UI5 and cap2UI5 repositories.
lib/repos.mjscarried the legacy directory names (ai-demokit,abap2UI5-api,ai-view-check, …) andvscode-extension/src/repolayout.tsrestated them as TypeScript constants, with a comment admitting it and no gate between them — so the next rename would have landed half. The list is nowlib/repo-dirs.jsonhere, and the extension consumes a generated snapshot of it with a:checkdrift gate and a weekly bump workflow, the same pattern it already uses for the app template and the client API.scaffold_apprestated the template's file list and substitutions. It now executesapp-template'stemplate.json, which is the source. Two latent bugs fell out:.gitignorewas being omitted from scaffolded projects, andpackage.json's name was left asabap2ui5-app.run_appwith different semantics — a real system versus the transpiled sandbox — and both are registered in the same window. The extension's isrun_app_on_systemnow.AGENTS.mdwas infiles[], shipping the maintainer briefing to every installer. The server never reads it; RELEASING.md conflated an agent working on this repository with an agent driving the server, and is corrected.npm ci+npm test: 54/54.🤖 Generated with Claude Code
https://claude.ai/code/session_01PLDFPfAK1MGq6qHeC6KKWH
Generated by Claude Code