fix(linkedin-studio): S12 — close S11 re-review + render-chain-propagation lint guard

Closes the 2 grep-verified findings from the S11 cold full-brief re-review
(docs/remediation/review.md, BLOCK 1/0/1/0, 0 dropped). Both were the NEXT
RING of the meta-class S10/S11 converged: a propagation miss — the fix had
landed where the SC named the file, not in the render-source it depends on.

BLOCKER (command->reference propagation): references/ab-testing-framework.md:166
still shipped the banned A/B "Significant? (>20%)" Yes/No verdict column while
commands/ab-test.md (which RENDERS from it, inlined at :30, presented at :69)
had been cleaned to the honest "Directional?" framing. Re-framed the reference
result template to match the command verbatim (header + the directional note)
and retuned :38 "20% significance threshold" -> "minimum-meaningful-difference
threshold". The whole render chain is now significance-verdict-free.

MINOR ($-replacement, class-closed not line-patched): the newest-first section
appends/rewrites in hooks/scripts/state-updater.mjs passed a replacement STRING
embedding untrusted user content to String.replace, so dollar-sequences
($1 / $& / dollar-backtick / dollar-apostrophe / $$) in a topic/hook/partner
(e.g. "$100 budget cut") re-injected the captured heading and dropped
characters, silently corrupting state. Converted all 5 content-bearing sites
(Recent Posts, prune, Milestone Log, First-Hour, Outreach) to replacement
FUNCTIONS; the 3 remaining $1 sites only interpolate date scalars. +4
$-bearing regression tests — incl. the prune fixture, which itself had to
switch to a function (the bug bit the fixture as it was being written).

META (generalize the lint to the propagation-miss class): new test-runner.sh
Section 11 — render-chain propagation guard. Forbids the significance-verdict
column (Significant? adjacent to "(" or a table pipe) across the WHOLE render
chain (commands + every inlined reference + adjacent surfaces), with a
permanent non-vacuity self-test (3 verdict forms caught, 6 legitimate
Significant/significance/Directional? forms ignored) and an e2e mutation-proof.
Generalizes S10/S11's "fix the class, not the line" to command->reference.

Pre-patch render-chain sweep confirmed ab-testing-framework.md was the SOLE
propagation survivor (so a 6th review finds no 3rd). test-runner.sh 70/0/0;
node --test 98/98. CLAUDE.md lint enumeration synced.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-05-30 15:42:25 +02:00
commit 36f79dd702
5 changed files with 183 additions and 10 deletions

View file

@ -35,7 +35,7 @@ This is NOT a true controlled experiment. Confounders include:
- **External events:** Trending topics, holidays, and news affect feed behavior
- **Network effects:** A new viral connection can skew reach mid-test
The 20% significance threshold (see Statistical Interpretation below) accounts for these confounders.
The 20% minimum-meaningful-difference threshold (see Statistical Interpretation below) accounts for these confounders.
## What You Can Test (Variables)
@ -163,13 +163,15 @@ Use this template to record completed tests:
- [List all controlled variables]
### Results
| Metric | Variant A (Avg) | Variant B (Avg) | Difference | Significant? (>20%) |
|--------|-----------------|-----------------|------------|---------------------|
| Metric | Variant A (Avg) | Variant B (Avg) | Difference | Directional? |
|--------|-----------------|-----------------|------------|--------------|
| Impressions | X | X | X% | Yes/No |
| Engagement Rate | X% | X% | X% | Yes/No |
| Comments | X | X | X% | Yes/No |
| Reposts | X | X | X% | Yes/No |
_"Directional?" = the gap clears the ~20% minimum-meaningful-difference AND points the same way across most posts. It is a direction to test further, not a statistically significant result._
### Individual Post Data
| Post # | Variant | Date | Impressions | Reactions | Comments | Reposts | Eng. Rate |
|--------|---------|------|-------------|-----------|----------|---------|-----------|