Repository navigation
fix(system-prompts): strip the removed remote-rules bootstrap from stored prompts - #244
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 returns200 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.sqlremoves only that block fromsettings.system_prompts, recognised by shape and not by its wording:REMOTE_ROOT,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 onlygo vet -tags=integrationand a PL/pgSQL syntax parse were run; the migration itself has not run against Postgres yet, CI does that.🤖 Generated with Claude Code