Skip to content

feat: export the refusal-reaction baseline (REFUSAL_REACTIONS + fallback) - #88

Merged
antra-tess merged 1 commit into
anima-research:mainfrom
slimepriestess:feat/refusal-reaction-baseline
Aug 6, 2026
Merged

feat: export the refusal-reaction baseline (REFUSAL_REACTIONS + fallback)#88
antra-tess merged 1 commit into
anima-research:mainfrom
slimepriestess:feat/refusal-reaction-baseline

Conversation

@slimepriestess

Copy link
Copy Markdown
Contributor

First of the two protective-baseline companion PRs per Sol's #architecture spec (8/4 21:54 + 22:09); the connectome-host injection PR follows and consumes this export. Discord-side precedence/reporting is anima-research/discord-mcpl#19.

What it does

REFUSAL_REACTIONS moves out of AgentFramework's private static into src/refusal-reactions.ts, exported from the root index together with REFUSAL_REACTION_FALLBACK (🛑) and REFUSAL_REACTION_BASELINE — the deduplicated set of every marker reactToRefusal can emit. Same values, same fallback semantics; reactToRefusal now consumes the shared constant.

The point of one constant rather than two synced lists: the emitted annotation set and the exported baseline cannot drift — "what we stamp" and "what we suppress" are structurally the same object, per the meta-lesson of the 8/3 Mythos self-amplifying refusal loop.

Tests (Sol's composed-test item 1, AF's share)

test/refusal-reaction-baseline.test.ts, 3 tests driving the real (private) reactToRefusal against a stubbed Discord locus:

  • baseline = category values + fallback, deduplicated, no empties;
  • exactness both ways: every category's emitted emoji plus the unknown-category fallback ∈ baseline, AND the emitted set equals the baseline exactly (no stale suppressed-but-never-stamped entries);
  • comma-join env round-trip safety (no commas/whitespace in entries; join(',')split(',') is identity), matching discord-mcpl's parseSuppressionEnvTokens.

8/8 with the adjacent assistant-persist-refusal suite; isolated-suite runs per the known WS port-flake situation on full bun test (same cluster on clean main on this machine — flagged before on #86, still wants an independent run).

tsc --noEmit has 3 pre-existing errors on main (framework.ts ~5569, maxAttempts/category on never) — verified identical with this change stashed; not introduced here.

(Implementation and this description drafted by Claude at Ra's request.)

🤖 Generated with Claude Code

…ack)

The category→emoji map moves out of AgentFramework's private static into
src/refusal-reactions.ts and is exported from the root index, alongside
the fallback marker and REFUSAL_REACTION_BASELINE — the deduplicated set
of every marker reactToRefusal can emit. Host composition serializes the
baseline into DISCORD_SUPPRESSED_REACTIONS_BASELINE so never-configured
Discord deployments default to suppressing exactly the annotations the
framework stamps (the 8/3 Mythos loop, made structurally impossible
rather than kept in sync by hand).

reactToRefusal consumes the same constant, so emitted set and exported
baseline cannot drift; the new test pins the contract in both directions
(everything emitted is in the baseline, nothing in the baseline is
unreachable) plus the comma-join env round-trip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants