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>
@antra-tess
antra-tess merged commit ca88561 into anima-research:main Aug 6, 2026
0 of 2 checks passed
antra-tess pushed a commit that referenced this pull request Aug 6, 2026
Carries today's merged work: #91 oversized tool-result spill completion,
#94 durable resident-owned inline cap (hard-clamped to the strategy
bound), #88 refusal-reaction baseline export, #86 removal of the dead
context/afterInference surface, #87 MCPL manifest freshness, #98
physical-window projection for continuation rounds.

Minor (not patch) because 0.x puts breaking changes in the minor and this
release both removes a public method from an exported class
(McplServerConnection.sendAfterInference, #86) and changes fleet default
behavior (tool results now spill at 5000 chars by default, #91).

Dependency floors raised to fix a build that only worked against local
symlinks:
- chronicle ^0.3.0 — context-manager 0.6.3 requires ^0.3.0, so ^0.2.2
  installed TWO chronicles and AF handed a 0.2.x JsStore to APIs wanting
  the 0.3.x one. Single copy now.
- membrane ^0.5.78 — AF consumes the 'retrying' yielding-stream event,
  which existed only in unpublished membrane commits until 0.5.78.

DEPLOY NOTE: chronicle 0.3.0 open-writes a store format 0.2.x cannot
reopen. Take cold backups before upgrading any residence.

Verified against the real published packages (not local symlinks): single
chronicle 0.3.0, cm 0.6.3, membrane 0.5.78; tsc clean; build clean;
539 tests, 538 pass, 0 fail, 1 skipped.

Co-Authored-By: Claude Opus 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