Skip to content

fix(system-prompts): strip the removed remote-rules bootstrap from stored prompts - #244

Merged
HTExplicit merged 1 commit into
mainfrom
fix/system-prompt-dead-remote-bootstrap
Oct 4, 2026
Merged

HTExplicit merged 1 commit into
mainfrom
fix/system-prompt-dead-remote-bootstrap

Conversation

@HTExplicit

Copy link
Copy Markdown
Owner

What

Enabling the system prompt library makes the model answer that the remote rules path is the site's front-end fallback page and cannot be read as Markdown.

The library prompt that 259 carried over from the legacy default rule still tells the model to fetch files under /skills/security-research/current/ first. That public route was deleted with the remote Skill registry in #206; on the live site it now returns 200 text/html (the single-page front end), so the model is promised Markdown and gets HTML.

Change

Migration 269_strip_removed_remote_rules_bootstrap_from_system_prompts.sql removes only that block from settings.system_prompts, recognised by shape and not by its wording:

  • the fenced paragraph that names the removed route,
  • the paragraphs directly after it that still mention REMOTE_ROOT,
  • the short fetch instruction directly before it.

A prompt whose route reference sits anywhere else, or that would be empty without the block, is left as stored and a notice is raised. Every other paragraph, the library order, the global switch, the default prompt and all other settings are untouched; a library without the route is not written; running the file again is a no-op. No code path changes, no new route.

The migration and its test use only invented prompt text.

Check

TestMigration269StripsRemovedRemoteRulesBootstrap (integration build tag) covers: the block with and without the lead line, a block at the end, a block with nothing before it, a reference inside a long paragraph, a body that would become empty, a clean library (not written), non-library values and a missing row, each applied twice. Locally only go vet -tags=integration and a PL/pgSQL syntax parse were run; the migration itself has not run against Postgres yet, CI does that.

🤖 Generated with Claude Code

…ored prompts

259 kept the legacy default rule as a library prompt together with a block that
tells the model to fetch files under /skills/security-research/current/ first.
That public route went away with the remote Skill registry (#206) and now falls
through to the front end, so a client that follows the instruction reads an HTML
page and reports that it cannot read the rules.

Migration 269 removes only that block, recognised by shape: the fenced
paragraph naming the route, the paragraphs after it that still mention
REMOTE_ROOT, and the short fetch instruction directly before it. A prompt whose
route reference sits elsewhere, or that would be empty without the block, is
left as stored and reported with a notice. No other setting or paragraph is
touched and the file can run again.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@HTExplicit
HTExplicit merged commit 294896d into main Oct 4, 2026
18 checks passed
@HTExplicit
HTExplicit deleted the fix/system-prompt-dead-remote-bootstrap branch October 4, 2026 12:44
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