Skip to content

Drop articles before domain nouns for rename safety#56

Merged
dadachi merged 1 commit intomainfrom
substrate-rename-safety-fixes
May 8, 2026
Merged

Drop articles before domain nouns for rename safety#56
dadachi merged 1 commit intomainfrom
substrate-rename-safety-fixes

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented May 8, 2026

Summary

  • Apply the substrate rename-safety contract: remove a / an / the directly preceding Shop, Shopkeeper, and ItemTag (any case form) so the agent's text-only rename pipeline can't produce article disagreements like "an patient" or "a office" when users pick consonant- or vowel-starting rename targets.
  • Touches test descriptors (rule 4), code comments (rule 6), OpenAPI endpoint summaries (rule 1, scanned by the rename pipeline as .yaml), and substrate meta-docs.
  • No app code, locales, or model strings needed changes — the substrate was already mostly contract-compliant outside docs/ and test/.

Changes

  • Test descriptors (7): test/controllers/api/v1/shopkeeper/{item_tags,shops}_controller_test.rb, test/models/shop_test.rb
  • Comments (2): test/controllers/api/v1/shopkeeper/base_controller_test.rb, test/models/accounts_invitation_test.rb
  • OpenAPI summaries (12): docs/openapi.yaml
  • Substrate meta-docs (7): docs/phase1-rails-api.md, docs/nativeapptemplate-substrate-v2-overview.md

Test plan

  • bin/rubocop — 227 files inspected, no offenses
  • bin/rails test — 398 runs, 815 assertions, 0 failures, 0 errors, 0 skips
  • Spot-check rename pipeline output for an ItemTag → Patient (consonant) substitution and confirm no "an patient" / "an Patient" leaks remain

🤖 Generated with Claude Code

Apply the substrate rename-safety contract: remove "a" / "an" / "the"
directly preceding Shop, Shopkeeper, and ItemTag (in any case form)
across test descriptors, code comments, OpenAPI summaries, and
substrate meta-docs. The agent's text-only rename pipeline would
otherwise produce article disagreements like "an patient" or "a office"
when users pick consonant- or vowel-starting rename targets.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit 6288521 into main May 8, 2026
3 checks passed
@dadachi dadachi deleted the substrate-rename-safety-fixes branch May 8, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant