Skip to content

fix(workspace): guard undotted typos.toml against dual configs - #1289

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1280-undotted-typos-guard
Jul 29, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1280-undotted-typos-guard

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

The typos tool reads its config from typos.toml, .typos.toml, or _typos.toml. The scaffold guarded the preserved .typos.toml (#913) and the legacy _typos.toml (copy-time exclude), but an undotted typos.toml escaped the guard: the template .typos.toml was shipped alongside it, leaving two active configs and silently shadowing the consumer's curated allowlist.

The #913 copy-time branch now treats any alternate spelling (typos.toml and/or _typos.toml, with no .typos.toml present) as the consumer's single active config: the template copy is not shipped, the skip is mirrored in --preview via the shared MODE_CONFIG_EXCLUDES SSoT, and the scaffold surface message names the triggering file(s).

Changes

  • assets/init-workspace.sh: extend the legacy-typos exclude to undotted typos.toml (TYPOS_ALT_CONFIGS records the triggering spellings); generalize the surface message; update enumerating comments.
  • tests/bats/init-workspace.bats: 4 new fix(workspace): undotted typos.toml escapes the #913 dual-config guard #1280 cases (dual-config guard, --preview ADDED truthfulness, surface message, both-files no-misfire combo).
  • CHANGELOG.md (+ generated devcontainer mirror): Fixed entry.

Test evidence

Merge order

Part of the #1280–#1285 solo-adoption batch; recommended merge order #1281 → #1280 → #1283 → #1282 → #1284 → #1285 (shared init-workspace.sh/CHANGELOG surface).

Closes #1280

c-vigo added 2 commits July 29, 2026 08:39
Add failing cases for #1280: an undotted typos.toml (with no .typos.toml)
must be treated like the legacy _typos.toml case — consumer file stays the
single active config, template .typos.toml not shipped, mirrored in --preview,
and the skip is surfaced. Includes a regression guard for the combo case
where a curated .typos.toml is also present (preserve-list path).

Refs: #1280
The `typos` tool reads config from .typos.toml, _typos.toml, or the undotted
typos.toml. The scaffold guarded the first two but not the undotted spelling,
so a consumer carrying typos.toml (and no .typos.toml) also received the
template .typos.toml — two active configs, the curated allowlist silently
shadowed. Extend the #913 copy-time guard to also match an undotted
typos.toml: the consumer file stays the single active config, the template
copy is not shipped, and the skip is mirrored in --preview and named in the
scaffold surface message.

Refs: #1280
@c-vigo
c-vigo merged commit a753406 into dev Jul 29, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1280-undotted-typos-guard branch July 29, 2026 09:38
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