Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ CXXFLAGS = { value = "-DNDEBUG", force = false }

# Global accounting (savings ledger, worldwide-counter flushes) is ON by
# default for installed binaries, but `cargo test` / `cargo run` would then
# write temp-project rows into the developer's real ~/.tracedecay/global.db
# (or a legacy ~/.tokensave/global.db when present). Keep cargo-launched
# processes hermetic; tests that exercise the ledger opt back in with
# TRACEDECAY_ENABLE_GLOBAL_DB=1 or legacy TOKENSAVE_ENABLE_GLOBAL_DB=1.
# write temp-project rows into the developer's real ~/.tracedecay/global.db.
# Keep cargo-launched processes hermetic; tests that exercise the ledger opt
# back in with TRACEDECAY_ENABLE_GLOBAL_DB=1.
# Installed binaries run outside cargo and are unaffected.
TRACEDECAY_DISABLE_GLOBAL_DB = { value = "1", force = false }
TOKENSAVE_DISABLE_GLOBAL_DB = { value = "1", force = false }
37 changes: 4 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
name: Test ${{ matrix.name }}
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository || contains(fromJSON('["master","feature/holographic-memory"]'), github.event.pull_request.base.ref) }}
runs-on: ${{ fromJSON(matrix.runner) }}
env:
CARGO_BUILD_JOBS: "2"
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -65,39 +63,8 @@ jobs:
${{ runner.os }}-cargo-

- name: Run tests
if: runner.os != 'Windows'
run: cargo test --workspace
Comment thread
ScriptedAlchemy marked this conversation as resolved.

- name: Run tests (Windows, serialized)
if: runner.os == 'Windows'
env:
RUST_TEST_THREADS: "1"
run: |
$ErrorActionPreference = "Stop"

cargo test --workspace --lib --bins -- --test-threads=1

$testFiles = @(Get-ChildItem -Path tests -Filter *.rs |
ForEach-Object { $_.BaseName } |
Sort-Object)

$integrationArgs = @("test", "--workspace")
foreach ($test in ($testFiles | Where-Object { $_ -ne "branch_db_safety_test" })) {
$integrationArgs += @("--test", $test)
}
$integrationArgs += @("--", "--test-threads=1")
cargo @integrationArgs

$cases = cargo test --test branch_db_safety_test -- --list |
Where-Object { $_ -match ': test$' } |
ForEach-Object { ($_ -split ':')[0] }

foreach ($case in $cases) {
cargo test --test branch_db_safety_test $case -- --exact --test-threads=1
}

cargo test --workspace --doc -- --test-threads=1

clippy:
name: Clippy
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository || contains(fromJSON('["master","feature/holographic-memory"]'), github.event.pull_request.base.ref) }}
Expand Down Expand Up @@ -158,6 +125,10 @@ jobs:
holographic/dist/style.css
lcm/dist/index.js
lcm/dist/style.css
graph/dist/index.js
graph/dist/style.css
savings/dist/index.js
savings/dist/style.css
steps:
- uses: actions/checkout@v7

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
done

# NOTE: the Homebrew tap (ScriptedAlchemy/homebrew-tap) is an external
# repo — any legacy Formula/tokensave-beta.rb there must be removed
# repo — any previous beta formula there must be removed
# separately; this step only writes Formula/tracedecay-beta.rb.
- name: Update formula
env:
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
echo "sha256_win64=${SHA256}" >> "$GITHUB_OUTPUT"

# NOTE: the Scoop bucket (ScriptedAlchemy/scoop-bucket) is an external
# repo — any legacy bucket/tokensave-beta.json there must be removed
# repo — any previous beta bucket manifest there must be removed
# separately; this step only writes bucket/tracedecay-beta.json.
- name: Update Scoop manifest
env:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
done

# NOTE: the Homebrew tap (ScriptedAlchemy/homebrew-tap) is an external
# repo — the old Formula/tokensave.rb there must be removed/renamed
# repo — the previous formula there must be removed/renamed
# separately; this step only writes the new Formula/tracedecay.rb.
- name: Update formula
env:
Expand Down Expand Up @@ -245,7 +245,6 @@ jobs:

cd tap
# Clean up the legacy pre-rebrand formula if it still exists.
git rm -f --ignore-unmatch Formula/tokensave.rb
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Formula/tracedecay.rb
Expand Down Expand Up @@ -275,7 +274,7 @@ jobs:
echo "sha256_win64=${SHA256}" >> "$GITHUB_OUTPUT"

# NOTE: the Scoop bucket (ScriptedAlchemy/scoop-bucket) is an external
# repo — the old bucket/tokensave.json there must be removed separately;
# repo — the previous bucket manifest there must be removed separately;
# this step only writes the new bucket/tracedecay.json.
- name: Update Scoop manifest
env:
Expand Down Expand Up @@ -316,7 +315,6 @@ jobs:
mkdir -p bucket
cp ../tracedecay.json bucket/tracedecay.json
# Clean up legacy pre-rebrand manifests (root-level and bucket/).
git rm -f --ignore-unmatch tokensave.json bucket/tokensave.json
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add bucket/tracedecay.json
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/target
.DS_Store
.codegraph
.tokensave
.tracedecay
.mcp.json
!codex-plugin/.mcp.json
Expand All @@ -18,4 +17,3 @@ generated-illustrations/
*.log
*~
*#

14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

- Memory deletion is permanent by design: no archive/soft-delete/restore features anywhere; dashboard curation hard-deletes facts.
- In Hermes, tracedecay is both the memory provider and the context-engine provider for every profile; the provider name is "tracedecay" (not "lcm"), replacing the legacy hermes-lcm and holographic_plus plugins.
- Hermes profiles bound to a project use that project's repo-level `.tracedecay` databases (legacy `.tokensave` directories are still honored as a fallback); only the default profile stores tracedecay data at the profile level under `~/.hermes`.
- Hermes profiles bound to a project use the user-level TraceDecay store, scoped to the current project by default. Repo-level TraceDecay databases are not active runtime stores.
- The Hermes tracedecay plugin must keep working against stock, uncustomized Hermes — verified by a CI job that installs stock Hermes; the user's Hermes fork only adds optional extras.
- The canonical repo is ScriptedAlchemy/tracedecay (renamed from ScriptedAlchemy/tokensave; GitHub redirects the old URL): never push or open PRs to the aovestdipaperino upstream; only the tokensave-large-treesitters dependency intentionally stays pointed at upstream.
- The canonical repo is ScriptedAlchemy/tracedecay: never push or open PRs to the aovestdipaperino upstream; only the tree-sitter grammar dependency intentionally stays pointed at upstream.
- The standalone `tracedecay dashboard` server is the canonical dashboard implementation; the Hermes plugin wraps and reuses it, layering Hermes-only extras (e.g. LLM-based curation) on top.
- `tracedecay install --local` scopes the database to the repo's `.tracedecay/`; otherwise storage lives at the user/profile level.
- `tracedecay install --local` writes project integration files only; TraceDecay storage lives at the user/profile level and is scoped to the current project by default.

## Workspace Guidance

Expand All @@ -30,14 +30,14 @@

Before reading source files or scanning the codebase, use the tracedecay MCP tools (`tracedecay_context`, `tracedecay_search`, `tracedecay_callers`, `tracedecay_callees`, `tracedecay_impact`, `tracedecay_node`, `tracedecay_files`, `tracedecay_affected`). They provide instant semantic results from a pre-built knowledge graph and are faster than file reads.

If a code analysis question cannot be fully answered by tracedecay MCP tools, try querying the SQLite database directly at `.tracedecay/tracedecay.db` (tables: `nodes`, `edges`, `files`). Use SQL to answer complex structural queries that go beyond what the built-in tools expose.
If a code analysis question cannot be fully answered by tracedecay MCP tools, use `tracedecay_storage_status` or `tracedecay_active_project` to get the resolved active graph database path before querying SQLite directly (tables: `nodes`, `edges`, `files`). Use SQL to answer complex structural queries that go beyond what the built-in tools expose.

If you discover a gap where an extractor, schema, or tracedecay tool could be improved to answer a question natively, propose to the user that they open an issue at https://github.com/ScriptedAlchemy/tracedecay describing the limitation. **Remind the user to strip any sensitive or proprietary code from the bug description before submitting.**

## Cargo contention (concurrent Kanban workers)

Cargo holds an exclusive lock on its target dir for the whole build; concurrent workers hitting the same dir block (`Blocking waiting for file lock on build directory`) and look stale to the dispatcher. Every cargo-heavy card must export, **before its first cargo command**:
Cargo holds an exclusive lock on its target dir for the whole build; concurrent workers hitting the same dir block (`Blocking waiting for file lock on build directory`) and look stale to the dispatcher. Every cargo-heavy card must export a target outside the project tree, **before its first cargo command**:

export CARGO_TARGET_DIR="$HERMES_KANBAN_WORKSPACE/.tracedecay/target/$HERMES_KANBAN_TASK"
export CARGO_TARGET_DIR="/tmp/tracedecay-target/$HERMES_KANBAN_TASK"

Never run bare `cargo` against the repo `target/` — it is the user's ~399 GB interactive dir and is contended. Leave `.tracedecay/target/` (no suffix) to the tracedecay MCP diagnostic tools. Full-workspace integration checks use the serialized `.tracedecay/target/integration/` lane (one at a time). Reclaim disk with `rm -rf "$CARGO_TARGET_DIR"` before completing. Full policy: `docs/CARGO-CONTENTION-POLICY.md`.
Never run bare `cargo` against the repo `target/` — it is the user's ~399 GB interactive dir and is contended. Full-workspace integration checks should use their own target dir so they do not block unrelated workers. Reclaim disk with `rm -rf "$CARGO_TARGET_DIR"` before completing. Full policy: `docs/CARGO-CONTENTION-POLICY.md`.
Loading
Loading