Skip to content

fix(mcp): demote stale prime items, drop stub handoffs, widen pool - #252

Open
christopherkarani wants to merge 1 commit into
mainfrom
fix/stale-prime
Open

christopherkarani wants to merge 1 commit into
mainfrom
fix/stale-prime

Conversation

@christopherkarani

Copy link
Copy Markdown
Owner

SessionStart primes surfaced stale-flagged items at full rank and rendered teardown-residue handoffs, teaching agents Wax is noise (an agent rated the primed context 35/100 with zero tool calls).

Changes

  • MCPPrimeAssembly.projectOrder: stale-hinted items sort below fresh items within their type rank; still render as backfill, never dropped.
  • MCPPrimeAssembly.boundedHandoff: new 32-char minimum for taskless handoffs (pending-tasks exemption preserved); suppresses residue like transport idleExpiry.
  • MCPCheckpointRunner: checkpoint without a content file now closes with empty content + record_handoff:false instead of recording the literal stub checkpoint (mirrors transport teardown; removes defaultHandoffContent).
  • MCPPrimeRunner: project probe pool 8→12 so assembly has room to filter and demote.

Verification

  • 7 new tests (TDD, each failed pre-fix): stale ordering in StalenessSignalsTests, handoff bar in MCPPrimeAssemblyTests, checkpoint record behavior in MCPCheckpointTests.
  • 119 tests green across affected suites; teardown regression tests green with --traits MCPServer.
  • Live before/after probe on the real store: junk handoff gone, misleading legacy-contract decision gone, fresh-first ordering within every type.
  • public_repo_hygiene.sh exits 0.

Known residual

Strict type-rank can still let stale-heavy lanes fill all 5 slots and squeeze out fresh decisions; the 8→12 pool makes this more visible. Follow-up: global freshness demotion or a stale-render cap — needs a product call, deliberately not in this diff.

SessionStart primes surfaced stale-flagged items at full rank and rendered
teardown-residue handoffs ("transport idleExpiry"), teaching agents Wax is
noise. Rank stale-hinted items below fresh items within their type (kept as
backfill, never dropped); suppress taskless handoffs under 32 chars; close
the checkpoint stub write ("checkpoint" literal now closes with
record_handoff=false, mirroring transport teardown); widen the project probe
pool 8->12 so assembly has room to filter and demote.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

This branch has not been deployed

No deployments
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