Skip to content

docs(adr): the emitted CI template moves, the plugin does not (#13) - #15

Merged
A-PachecoT merged 1 commit into
mainfrom
docs/13-mdx-publish-signal
Aug 17, 2026
Merged

docs(adr): the emitted CI template moves, the plugin does not (#13)#15
A-PachecoT merged 1 commit into
mainfrom
docs/13-mdx-publish-signal

Conversation

@A-PachecoT

Copy link
Copy Markdown
Contributor

Records the product call issue #13 asks for. No plugin code changes — that is the finding, and the reasoning is why.

The premise did not hold, so the answer is not the one on offer

#13 offers two options: widen the emitted template, or stop treating .mdx as the plugin's primary publish signal. I instrumented the second before choosing, firing post-edit.sh with the real captured payload shape, each arm paired with the control that would falsify it (7/7):

  • With a vault.yaml above the file, the dirty-list append is unconditionalROOT.md (which is_doc() rejects) and even CODE.ts land on the list. Orphan list empty (control).
  • With no vault, is_doc() does discriminate — the .mdx raises the orphan warning, a root .md and a .ts raise nothing. Dirty list empty (control).

is_doc() has exactly one caller, post-edit.sh's elif branch, and it gates the orphan warning. It is not on the path that produces the nag. Option 2 would not have changed the reported symptom.

What actually produces it, already tested here

published_by_repo_action() reads the workflow's real paths: list. hooks/tests/run.sh already pins both shapes, green before this PR:

workflow paths: doc Stop hook
['**.md'] — the emitted template .mdx nags — correct, the Action will not publish it
['**.md','**.mdx'] — hand-widened .mdx silent — correct, it will

The hook is right under both. It is honest about the inconsistency; it cannot resolve it.

The decision

The emitted CI template moves. Because the plugin is not the mechanism; because .mdx is first-class to the product the template automates (basalt pull writes canonical MDX, and the CLI's slug derivation strips .md and .mdx alike, so the template is narrower than the CLI emitting it); and because narrowing is_doc() would blind the orphan sensor to exactly the extension basalt pull writes — and that sensor exists for the one Basalt failure that is silent.

Measured on basalt-cli@0.10.0: the template has three .md-only filters, not the two #13 quotes — both paths: lists and the run step's git ls-files '*.md'. All three must widen, or a trigger fires on a file that is then never passed to basalt publish.

That file is in the private CLI repo (ADR 0001), so it ships from there. This is the plugin's half.

Follow-up this creates

When the template widens, WF_CANON in hooks/tests/run.sh should widen with it and the .mdx cell flips from nags to silent legitimately — keeping its paired negative arm, since a doc edited and not pushed must still nag.

Leaving #13 open until both halves agree; this PR does not close it.

#13 asks which of the plugin and the CLI is wrong about `.mdx`. Answering it
needed the premise measured first, and it did not hold.

The issue names `hooks/lib.sh:is_doc()` as the primary intent-to-publish
signal. Instrumented with real captured payloads, `is_doc()` has one caller —
`post-edit.sh`, the `elif` branch — and it gates the ORPHAN warning. Under a
`vault.yaml` the dirty-list append is unconditional (a `.ts` file lands on it
too) and `is_doc()` never runs. So the issue`s option 2, "change the plugin`s
signal", cannot fix the reported symptom: it is not on that code path.

The nag comes from `published_by_repo_action()`, which reads the workflow`s
actual `paths:` list. The suite already pins both shapes: under the emitted
template a `.mdx` still nags (correct — the Action will not publish it), and
under a widened one it goes silent.

So the template is what is wrong, and all three of its `.md`-only filters must
widen — widening only the two `paths:` swaps a silent no-publish for a silent
no-op. That file lives in the private CLI repo, so this ADR is the plugin half:
a record that the plugin`s behavior is deliberate and stays.

Refs #13
@A-PachecoT
A-PachecoT merged commit b8cde4c into main Aug 17, 2026
1 check passed
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