Skip to content

chore: remove leftover junk and fix stale tests - #3132

Open
ScriptedAlchemy wants to merge 10 commits into
masterfrom
claude/codebase-cleanup-dead-code-4tjb49
Open

ScriptedAlchemy wants to merge 10 commits into
masterfrom
claude/codebase-cleanup-dead-code-4tjb49

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Removes leftover repo junk: dogfood-journey.md, stale .changeset/*.md entries, and Hawk workflow retrigger notes.
  • Wires up a test suite that was never compiled and repairs tests whose expected output had fallen behind the code.
  • Fixes Kimi/Pi host records that were never published on their first sweep.

Motivation

A sweep for dead code and leftover files, plus a full test run, turned up an unwired test module, several expectations that no longer match current output, and one real sessions bug.

Changes

  • crates/tracedecay-host-admission:
    • broker_group_commit_test.rs was never compiled; it is now wired in through #[path].
    • Its sync-count assertions now account for the extra Unix sync.
    • The latency fault is re-injected after reopen.
  • crates/tracedecay-sessions/src/runtime/source.rs: revise_host_record now takes the stored record as an Option. A host with no stored record now gets one published on its first sweep, instead of being skipped. Kimi and Pi pass the stored frontier through.
  • pi_tests.rs: the Pi fixture has nine lines, not eight. The contentless user message is refused, so session_info is the next observation.
  • graph_analysis_test.rs: expectations now include hotspot churn and the diff-context test_gate, in both JSON and markdown output and for empty diffs.
  • scripts/mcp-conformance-smoke.sh: an unknown tool now returns an isError tool result carrying the unknown_tool problem, which the MCP suites already pin. The Inspector CLI exits 0 for that result, so the old "exits nonzero" check could never pass. The smoke now asserts the typed refusal.

Test plan

  • The affected Bazel targets pass
  • bazel build //... passes when the change crosses package boundaries
  • Tested manually (details below)

Local runs, all Cargo-based (Bazel can't fetch its archives in this environment):

  • graph_analysis_test:: (mcp_suite): 71/71 pass.
  • Targeted mcp_suite and transport_acceptance_suite checks for status (the sessions fix), ast-grep and v2 mounts pass.
  • The host-admission broker suite and the Kimi/Pi session tests pass.
  • scripts/mcp-conformance-smoke.sh passes all checks.

Checklist

  • CHANGELOG.md updated (under [Unreleased] if no version bump)
  • No secrets, credentials, or .env files included
  • Breaking changes documented (if any): none

🤖 Generated with Claude Code

https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo


Generated by Claude Code


Devin Review

claude added 10 commits October 6, 2026 03:25
- Drop the root dogfood-journey.md, a one-off 2026-09-15 run report with
  machine-local paths that nothing references.
- Drop the .changeset/ notes: the repo has no changesets config or tooling
  and releases are cut by release-please from conventional commits, so
  nothing ever consumes them.
- Remove the stale "retrigger" comment lines from the Hawk workflow and the
  reference to a weekly schedule it does not have.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
broker_group_commit_test.rs was never declared as a module, so its
three broker-level group-commit tests never compiled or ran. Declare
it beside the other crate test modules and bring its expectations in
line with current behavior: directory syncs happen on Unix only, and
reopening the spool publishes once to clear the reconciled append
intent, so the second batch is measured with a fresh barrier counter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
DiffContextResultV1 now requires `test_gate`, so the SDK decoder
rejected the fixture and the freshness-injection test failed with
"value.test_gate is required".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
revise_host_record skipped any write whose byte_offset and file_id
matched the current record, and callers default an absent record to
zeros. An empty home's Kimi and Pi discovery frontiers and zero-unit
coverage rows therefore never landed, so status reported those
providers as unobserved forever. Every write stores mtime >= 1, so
treat mtime 0 as the absent record and publish it once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
diff_context now always carries the test-gate verdict and hotspot
rows carry 90-day churn, so the exact-payload assertions failed on
both fields. The fixture project is one commit, so each row's churn
is 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
revise_host_record took the defaulted record and recovered "absent"
from mtime == 0. Callers already hold get_parse_offset's Option, so pass
it through: an absent record is written, an unchanged stored one is not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
The golden Pi fixture gained a contentless user message, which capture
refuses, so the malformed-file test's fixture has nine lines and
session_info spans the last one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
The hotspots markdown rendering lists churn, and an empty diff_context
reports a passing test gate, like the absent-file case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
The server answers an unknown tool with an isError tool result carrying
the unknown_tool problem, as the MCP suites pin, so the Inspector CLI
exits zero and the old nonzero-exit check always failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
@changeset-bot

changeset-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f9492e4

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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread scripts/mcp-conformance-smoke.sh

Copy link
Copy Markdown
Owner Author

Test Linux was cancelled when it hit its 240-minute job timeout. This PR didn't cause that.

Master's own Bazel Linux lane does the same: dispatch run 37424361757 on the merged #3124 head also timed out at 240 minutes. That same run showed failures across the workspace that no file in this PR touches:

  • tree-sitter's build-dependency leaks serde_json's preserve_order feature into every Bazel crate, changing JSON key order and digests.
  • Unit tests compile without their crate features.
  • Some tests can't find fixtures through env!("CARGO_MANIFEST_DIR") when rustc runs sandboxed.

The fix is #3133 (14b8ffd4). It is still being validated through workflow_dispatch (run 37511829834). Once it is green I'll port it here, or merge master after it lands.

Clippy has been queued since 08:52 behind the repo-wide ci-clippy concurrency group. It hasn't started yet.


Generated by Claude Code

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.

2 participants