Skip to content

Commit 48f399e

Browse files
refactor(dogfood): remove retired subsystem
2 parents 5e759d3 + e18ddfb commit 48f399e

43 files changed

Lines changed: 399 additions & 3397 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@ TRACEDECAY_DATA_DIR = { value = "target/test-profile/.tracedecay", force = false
3535
# https://nexte.st/docs/installation/pre-built-binaries/
3636
test-all = "nextest run --workspace --all-features --no-fail-fast"
3737
test-ci = "nextest run --workspace --all-features --no-fail-fast"
38-
# Fast local iteration: build the ordinary development binary, then install a
39-
# stable copy through the same forward-only migration and health-check flow.
40-
dogfood = "run --quiet --bin tracedecay -- dogfood"

.codex/skills/dogfooding-tracedecay/agents/openai.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050

5151
# `build.rs` writes this stamp when it drives the npm build; the direct
5252
# npm build above skips it, so reproduce the exact stamp with the same
53-
# Rust module. Downstream consumers (dogfood, freshness checks) require
54-
# the artifact to ship a stamp that truthfully matches these sources.
53+
# Rust module. The artifact must ship a stamp that truthfully matches
54+
# these sources.
5555
- name: Write dashboard source stamp
5656
run: |
5757
rustc --edition 2024 -O build-support/write_dashboard_stamp.rs \
@@ -179,9 +179,8 @@ jobs:
179179
180180
release-version-drift:
181181
name: Release Version Drift
182-
# The dogfood command contract test below exercises the checkout's built
183-
# dashboard bundle and its .source-stamp, so this job consumes the same
184-
# artifact every Rust job uses instead of rebuilding the dashboard.
182+
# This job consumes the dashboard artifact shared by Rust jobs instead of
183+
# rebuilding it.
185184
needs: dashboard-assets
186185
# Also runs on push so the workflow-contract tests below actually protect
187186
# master, which is the branch they exist to protect. `on.push.branches` is
@@ -222,9 +221,6 @@ jobs:
222221
python3 scripts/test-resolve-release-source-profile.py
223222
python3 scripts/test-scoop-manifest-workflows.py
224223
225-
- name: Test local dogfood command contract
226-
run: bash tests/dogfood_command_test.sh
227-
228224
- name: Check release version drift
229225
continue-on-error: true
230226
# PR-only, unchanged. This one queries crates.io and fails whenever

build.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ fn build_and_embed_dashboard_app() {
7272
let stamp_path = app_dist.join(".source-stamp");
7373
println!("cargo::rerun-if-env-changed=TRACEDECAY_DASHBOARD_CONTRACT_SCHEMA_OUT");
7474
println!("cargo::rerun-if-env-changed=TRACEDECAY_SKIP_DASHBOARD_BUILD");
75-
println!("cargo::rerun-if-env-changed=TRACEDECAY_DOGFOOD_DASHBOARD_STAMP_PATH");
7675
let contract_schema_export =
7776
std::env::var_os("TRACEDECAY_DASHBOARD_CONTRACT_SCHEMA_OUT").is_some();
7877
let fresh = dashboard_cache::dist_is_fresh(repository_root, &source_stamp);
@@ -109,15 +108,6 @@ fn build_and_embed_dashboard_app() {
109108
contract_schema_export || app_dist.join("index.html").exists(),
110109
"dashboard/app-dist/index.html is missing after build; the dashboard frontend build failed"
111110
);
112-
if let Some(path) = std::env::var_os("TRACEDECAY_DOGFOOD_DASHBOARD_STAMP_PATH") {
113-
fs::write(Path::new(&path), &source_stamp).unwrap_or_else(|e| {
114-
panic!(
115-
"failed to write dogfood dashboard source stamp {}: {e}",
116-
Path::new(&path).display()
117-
)
118-
});
119-
}
120-
121111
// Generated manifest: one embedded entry per dist file.
122112
let mut code = String::from(
123113
"pub struct AppAsset { pub path: &'static str, pub contents: &'static [u8], pub content_type: &'static str }\n",
@@ -198,14 +188,8 @@ fn main() {
198188
// worktree was clean. Feeds the generated agent plugins' provenance header
199189
// (so a stale installed plugin is distinguishable from the binary that
200190
// should have generated it) and the SemVer build metadata the binary
201-
// reports as its own version. Git metadata tracks commits and staging;
202-
// dogfood supplies a refreshed stamp for unstaged and untracked changes.
191+
// reports as its own version. Git metadata tracks commits and staging.
203192
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR");
204-
println!("cargo::rerun-if-env-changed=TRACEDECAY_DOGFOOD_BUILD_IDENTITY_STAMP");
205-
println!("cargo::rerun-if-env-changed=TRACEDECAY_DOGFOOD_BUILD_IDENTITY_REFRESH");
206-
if let Some(path) = std::env::var_os("TRACEDECAY_DOGFOOD_BUILD_IDENTITY_STAMP") {
207-
println!("cargo::rerun-if-changed={}", Path::new(&path).display());
208-
}
209193
let identity = resolve(Path::new(&manifest_dir));
210194
for path in watch_paths(Path::new(&manifest_dir)) {
211195
println!("cargo::rerun-if-changed={}", path.display());

crates/tracedecay-global-db/src/observation/retention.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! (plan 38 §3, final clause).
33
//!
44
//! The observation store keeps three append-only, forever-growing evidence
5-
//! tables that dominated one dogfood `sessions.db`:
5+
//! tables that dominated one observed `sessions.db`:
66
//!
77
//! * `observations` — the durable observation payload (`observation_json`,
88
//! 1.8 GB measured).

crates/tracedecay-global-db/src/observation/schema.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ async fn migrate_observation_schema(
104104
return Ok(());
105105
}
106106

107-
// This full-table rewrite is exactly the operation that interrupted a
108-
// real dogfood upgrade on a 15GB `sessions.db` and, before the
109-
// `tracedecay_runtime_core::durability` model existed, failed the whole strict
110-
// post-update because of it (see `crate::doctor::heal`'s module doc).
107+
// This full-table rewrite previously interrupted a 15GB `sessions.db`
108+
// during an update.
111109
// `observations` must stay classified `Recoverable` -- re-derivable by
112110
// re-running sanitization/projection over recoverable transcript
113111
// sources -- for that failure to stay non-blocking; assert it here so a

crates/tracedecay-runtime-core/src/durability.rs

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
//! Store durability classification for the upgrade/migration path.
22
//!
3-
//! Diagnosed failure: `cargo dogfood` on a real 91GB profile failed because
4-
//! the post-update health pass tried to mount and repair a 15GB
5-
//! `sessions.db`, which triggered a full-table rewrite of the `observations`
6-
//! table mid-migration. That rewrite was interrupted, the mount failed, and
7-
//! because the health pass's `--strict` gate treated *every* warning as
8-
//! fatal, the whole upgrade failed -- recording
9-
//! `outcome=forward-recovery-required` and disabling the daemon.
3+
//! A large profile update tried to mount and repair a 15GB `sessions.db`,
4+
//! triggering a full-table rewrite of the `observations` table mid-migration.
5+
//! The rewrite was interrupted and the mount failed, even though the store's
6+
//! bulk transcript and evidence data could be safely retried later.
107
//!
118
//! The root cause: the upgrade path treated every store as equally precious.
129
//! It is not. This module gives the migration path a typed vocabulary for
@@ -58,19 +55,6 @@ pub enum StoreDurabilityClass {
5855
Recoverable,
5956
}
6057

61-
impl StoreDurabilityClass {
62-
/// Whether a failure to migrate/mount/repair data of this class is
63-
/// worth failing a `--strict` upgrade over. Only [`Self::Durable`] data
64-
/// qualifies -- it is the only class this model treats as irreplaceable.
65-
///
66-
/// Every other class may be handled best-effort: skipped, retried later,
67-
/// or (for [`Self::Derived`]) dropped and rebuilt outright, without
68-
/// operator intervention.
69-
pub const fn may_block_upgrade(self) -> bool {
70-
matches!(self, Self::Durable)
71-
}
72-
}
73-
7458
/// Mirrors [`tracedecay_store::StoreShardScopeV1`]'s cases without carrying
7559
/// its identifiers, so a caller can classify "the kind of store this is"
7660
/// without constructing a real project/repository/worktree id first.
@@ -257,13 +241,6 @@ mod tests {
257241
T::try_from(value.to_owned()).unwrap()
258242
}
259243

260-
#[test]
261-
fn only_durable_may_block_an_upgrade() {
262-
assert!(StoreDurabilityClass::Durable.may_block_upgrade());
263-
assert!(!StoreDurabilityClass::Derived.may_block_upgrade());
264-
assert!(!StoreDurabilityClass::Recoverable.may_block_upgrade());
265-
}
266-
267244
#[test]
268245
fn profile_and_profile_memory_and_project_are_durable() {
269246
assert_eq!(
@@ -290,9 +267,6 @@ mod tests {
290267
shard_kind_durability_class(StoreShardKind::ProjectSessions),
291268
StoreDurabilityClass::Recoverable
292269
);
293-
// The diagnosed bug: mounting/migrating a sessions store must never
294-
// be able to block a strict upgrade.
295-
assert!(!shard_kind_durability_class(StoreShardKind::ProjectSessions).may_block_upgrade());
296270
}
297271

298272
#[test]

crates/tracedecay-sessions/src/runtime/lcm/retention.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! * FTS shadow tables over each (`lcm_raw_messages_fts`,
1010
//! `session_messages_fts`), maintained by triggers.
1111
//!
12-
//! One dogfood `sessions.db` reached 15 GB carrying both full copies plus their
12+
//! One observed `sessions.db` reached 15 GB carrying both full copies plus their
1313
//! FTS shadows. Plan 38 §4 ("one content copy") makes carrying both raw and
1414
//! projected content indefinitely a defect: the projection must reference the
1515
//! raw content or be superseded once durable. Plan 38 §3 ("session retention

crates/tracedecay-sessions/src/runtime/transcript_backfill.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ mod tests {
13501350
}
13511351

13521352
#[tokio::test]
1353-
async fn dogfood_recovery_transcript_fact_failure_rolls_back_entire_batch() {
1353+
async fn transcript_fact_failure_rolls_back_entire_batch() {
13541354
let directory = tempfile::tempdir().unwrap();
13551355
let connection = tracedecay_runtime_core::db::engine::TestConnection::open(
13561356
&directory.path().join("sessions.db"),

dashboard/src/workspaces/costs/spend.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const LIVE_PROJECTS = [
1313
{ path: '/fast/projects/tracedecay', tokens_saved: 2_939_894_592 },
1414
{ path: '/w/sqlite-storage-runtime-current', tokens_saved: 2_140_723_247 },
1515
{ path: '/w/sqlite-storage-runtime', tokens_saved: 2_101_200_356 },
16-
{ path: '/w/dogfood-live-repair', tokens_saved: 2_078_590_272 },
17-
{ path: '/w/dogfood-hardening', tokens_saved: 1_946_100_344 },
16+
{ path: '/w/live-repair', tokens_saved: 2_078_590_272 },
17+
{ path: '/w/runtime-hardening', tokens_saved: 1_946_100_344 },
1818
{ path: '/w/pr8-migration', tokens_saved: 1_831_192_520 },
1919
{ path: '/w/pr8-acceptance-runner', tokens_saved: 1_824_171_535 },
2020
{ path: '/w/pr8-live-tools', tokens_saved: 1_824_065_209 },
@@ -51,7 +51,7 @@ describe('summarizeProjectSpread', () => {
5151
'/fast/projects/tracedecay',
5252
'/w/sqlite-storage-runtime-current',
5353
'/w/sqlite-storage-runtime',
54-
'/w/dogfood-live-repair',
54+
'/w/live-repair',
5555
]);
5656
expect(spread.deviations[0]!.deviation).toBeLessThan(-0.5);
5757
expect(spread.deviations[1]!.deviation).toBeGreaterThan(0.5);

0 commit comments

Comments
 (0)