Skip to content

refactor: encode duplicated contracts in their owning authorities - #1515

Closed
ScriptedAlchemy wants to merge 2 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/encode-lessons-in-structure-095a
Closed

ScriptedAlchemy wants to merge 2 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/encode-lessons-in-structure-095a

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Replace the hand-maintained tracedecay://schema markdown (and its "keep in sync" comment) with the migration inventory this binary actually admits.
  • Delete copied response-budget and native staging-page numbers; callers use MAX_RESPONSE_CHARS and MAX_NATIVE_GENERATION_STAGE_MUTATIONS.
  • Refuse hint specs at compile time when a credited tool is not an exact token in the hint text (tracedecay_context/search no longer counts as tracedecay_search).

Principle: encode-lessons-in-structure.

Motivation

PR #707 repeated the same lesson as comments ("keep in sync", "mirrors X", "update both together") next to a second copy. Those copies had already drifted: the schema resource still documented a deleted nodes/edges graph, and two hint categories credited tools the prose did not name.

This PR lands into codex/tracedecay-total-redesign-plan-reopened (PR #707 tip). It does not target master.

Merged tip: 3e6167b265639c17b7d1c174cd3b7baa3116adae.
Merge commit: 8085b801afc4d33a3027865af5424e49fd9bf60c.
Conflicts: none (ort merge).

The tip already compiled the NotApplicable admission arm and stopped walking the removed changes.reused list. Those fixes are in the merged tree and tracedecay-code-index-runtime builds.

Changes

  • crates/tracedecay-runtime-core/src/db/migrations/final_shape.rs renders schema markdown from the admission sqlite_master inventory.
  • MCP tracedecay://schema serves that render. The resource description no longer promises a hand-written recipe book.
  • Graph staging-page probes import MAX_NATIVE_GENERATION_STAGE_MUTATIONS. Response-budget tests import MAX_RESPONSE_CHARS.
  • Hint category specs go through HintCategorySpec::checked. Project-context prose names tracedecay_search; atomic-edit prose names tracedecay_move_symbol.

Test plan

  • cargo test -p tracedecay-runtime-core --lib db::migrations::final_shape::render_tests::rendered_schema_markdown_is_the_admission_inventory -- --exact — 1 passed
  • cargo test -p tracedecay --lib mcp::server::rmcp::tests::legacy_json_rpc_wire_frames_are_unchanged_by_the_typed_envelope -- --exact — 1 passed (resource body equals the inventory)
  • cargo test -p tracedecay-agent-hosts --lib hooks::tool_hints::expected_tool_token_tests::slash_joined_shorthand_does_not_name_the_second_tool -- --exact — 1 passed (also type-checks every hint spec)
  • circular render tests (handlers::analysis::circular::circular_render_tests) — 2 passed
  • cargo test -p tracedecay-graph-db --lib generation_runtime::tests::native_generation_stages_sixty_five_thousand_rows_in_one_durable_page -- --exact — 1 passed
  • cargo test -p tracedecay-graph-db --features test-helpers --test graph_db_suite a_partially_released_generation_is_repaired_from_its_manifest_and_swept --no-run — compiled
  • cargo test -p tracedecay-code-index-runtime --lib code_index_scheduler::tests::publication_store::generation_decode_shares_the_store_and_waits_for_an_exclusive_writer -- --exact — 1 passed after absorbing the tip
  • Full workspace nextest was not run

Checklist

  • No secrets, credentials, or .env files included
  • CHANGELOG.md updated — not a user-facing release note; schema resource now describes the live inventory
  • Breaking changes documented — tracedecay://schema body is no longer the old graph recipe; it is the admitted DDL
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 17, 2026 01:49
Hand-maintained copies of the SQLite schema, response budget, and native
staging page size were kept in sync by comments. Read them from the
owning inventory or constant, and refuse hint specs whose credited tools
are not exact tokens in the hint text.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
…r/encode-lessons-in-structure-095a

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8085b80

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Integrated or superseded directly on the #707 branch at ff36c4f; follow-up compile/typecheck regressions were fixed on that branch.

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