Shared prose-name gate: read the meta/ sidecars too - #58
Merged
Conversation
Copy of abap2UI5's `.github/shared/check-prose-names.mjs`, which is the source. The gate's scope was eight markdown files. In a repository whose ports each carry a `meta/<class>.json`, that misses where class names are written most often: `deviations[].what`, `audit.note` and `checked.note` are long-form prose - samples-controls' own AGENTS.md calls a deviation "a log entry about a process" and puts it there BECAUSE it is prose - and those sentences cite sibling ports constantly. Not hypothetical. A 2026-08-21 sweep removed the retired `z2ui5_cl_demo_app_*` citations and recorded itself finished: "36 class names across 8 prose files, every one of them existing". Two days later `meta/z2ui5_cl_smpc_app_038.json` still named `z2ui5_cl_demo_app_038`, a class that exists nowhere. It survived because it was never looked at, and it was found by a human reading that one port against its original. It travels further than a sidecar suggests: generate-overview.mjs bakes those texts into ABAP that gets pulled into a customer system. A second SIDECARS scope beside PROSE rather than more entries in it, since the files are JSON and the reader differs; both then reduce to a labelled piece of prose, so the regex, ABSENT and the whole ecosystem-wide resolution (foreign SAMPLES.md lookup included) run over sidecar text unchanged. The sidecar's own `class` field is not read - it resolves trivially and would double every port into the count. A repository with no `meta/` contributes no files, so this is inert where there are no sidecars. Measured: samples 25 names / no sidecars, samples-stack 14 / none, samples-controls 182 names across 8 files and 622 sidecars, all resolving. With the 038 defect put back, the run fails naming the deviation index rather than the 4 KB file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E8iuqE8QFQXpb1LzHQ3Ym5
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.
Copy of abap2UI5's
.github/shared/check-prose-names.mjs, which is the sourceof this file. Landing here first, because abap2UI5's
check:sharedcomparesits source against this repository's main.
This repository has no
meta/directory, so the newSIDECARSscopecontributes no files and the run is byte-for-byte what it was:
prose-names: 14 class name(s) checked in 8 prose file(s). The change matters insamples-controls, where every port carries ameta/<class>.jsonwhosedeviations[].what,audit.noteandchecked.noteare long-form prose citingsibling ports — and where a dead
z2ui5_cl_demo_app_038citation survived acorpus-wide sweep that reported itself finished, because sidecars were never in
scope.
Shape: a second scope beside
PROSErather than more entries in it, since thefiles are JSON and the reader differs. Both reduce to a labelled piece of
prose, so the regex,
ABSENTand the whole ecosystem-wide resolution (foreignSAMPLES.mdlookup included) run over sidecar text unchanged.node scripts/check-prose-names.mjspasses.Generated by Claude Code