Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
5c6685c
test(mcp): prove tracedecay_dependency_depth behavior
cursoragent Sep 18, 2026
2fbde7c
test(mcp): prove tracedecay_unused_imports behavior
cursoragent Sep 18, 2026
b0d62e1
test(mcp): prove tracedecay_derives behavior
cursoragent Sep 18, 2026
16534a7
test(mcp): prove tracedecay_doc_coverage behavior
cursoragent Sep 18, 2026
f9a974d
test(mcp): prove tracedecay_diagnose behavior
cursoragent Sep 18, 2026
123117e
test(mcp): prove tracedecay_field_sites behavior
cursoragent Sep 18, 2026
23a1886
test(mcp): prove tracedecay_configuration_unset behavior
cursoragent Sep 18, 2026
3626138
test(mcp): prove tracedecay_analytics behavior
cursoragent Sep 18, 2026
8c696ec
test(mcp): prove tracedecay_changelog behavior
cursoragent Sep 18, 2026
5e300a6
test(mcp): prove tracedecay_source_edit_rollback behavior
cursoragent Sep 18, 2026
ea885bd
test(mcp): prove tracedecay_context behavior
cursoragent Sep 18, 2026
a5ec4de
test(mcp): prove tracedecay_project_context behavior
cursoragent Sep 18, 2026
cab8be6
test(mcp): prove tracedecay_feedback_list behavior
cursoragent Sep 18, 2026
4a20a24
test(mcp): prove tracedecay_project_search behavior
cursoragent Sep 18, 2026
c235db8
test(mcp): prove tracedecay_affected_tests behavior
cursoragent Sep 18, 2026
2302a42
test(mcp): prove tracedecay_inheritance_depth behavior
cursoragent Sep 18, 2026
9052e3c
test(mcp): prove tracedecay_ast_grep_rewrite behavior
cursoragent Sep 18, 2026
0e994ea
test(mcp): read affected tests from the cycle payload
cursoragent Sep 18, 2026
a021ea5
merge(master): bring field-sites proof onto current CI
cursoragent Sep 18, 2026
3db2366
test(mcp): prove tracedecay_port_order behavior
cursoragent Sep 18, 2026
df7c950
test(mcp): lock observed changelog payloads
cursoragent Sep 18, 2026
29b074d
test(mcp): forward the compiler message through list
cursoragent Sep 18, 2026
98284ae
test(mcp): prove field-site qualifier refusals
cursoragent Sep 18, 2026
ca28240
test(mcp): lock observed ast-grep rewrite receipts
cursoragent Sep 18, 2026
239d3df
merge master into cursor/prove-inheritance-depth-7400
cursoragent Sep 18, 2026
8b8da44
test(mcp): lock ast-grep rewrite path refusals
cursoragent Sep 18, 2026
0531dfc
test(mcp): prove tracedecay_lcm_status behavior
cursoragent Sep 18, 2026
cef8695
style: format shared lock match chains
cursoragent Sep 18, 2026
a392716
test(mcp): assert reachable affected-tests answers
cursoragent Sep 18, 2026
8a1a682
Merge remote-tracking branch 'origin/master' into cursor/prove-projec…
cursoragent Sep 18, 2026
6fecdf8
test(mcp): prove tracedecay_lcm_grep behavior
cursoragent Sep 18, 2026
6198f90
test(mcp): prove tracedecay_project_list behavior
cursoragent Sep 18, 2026
2876663
test(mcp): deny non-list handles on feedback list
cursoragent Sep 18, 2026
c9b7486
test(mcp): keep inheritance-depth markdown response
cursoragent Sep 18, 2026
373509a
test(mcp): prove tracedecay_node behavior
cursoragent Sep 18, 2026
7544f72
fix(mcp): window automation rows by ledger schema
cursoragent Sep 18, 2026
20c41a2
fix(privacy): restore the RE2 dialect doc list
cursoragent Sep 18, 2026
4b0b7d1
Merge origin/master into rollback proof
cursoragent Sep 18, 2026
4c99941
test(mcp): pin the caller-visible registry failure
cursoragent Sep 18, 2026
add52f2
style: format shared lock match chains
cursoragent Sep 18, 2026
ff2b408
Merge branch 'master' into cursor/prove-project-context-6659
cursoragent Sep 18, 2026
e15027e
Merge remote-tracking branch 'origin/master' into cursor/prove-projec…
cursoragent Sep 18, 2026
a275c8a
test(mcp): assert observed source-edit rollback receipts
cursoragent Sep 18, 2026
6092079
style: format shared-lock chains for rustfmt
cursoragent Sep 18, 2026
b0273ea
style(runtime): format shared lock match chains
cursoragent Sep 18, 2026
1a91ee4
ci: rerun checks after queued cancellation
cursoragent Sep 18, 2026
7412a00
ci: rerun project context checks
cursoragent Sep 18, 2026
878db5e
ci: rerun checks cancelled while queued
cursoragent Sep 18, 2026
74f70bc
test(mcp): prove tracedecay_grep behavior
cursoragent Sep 18, 2026
3a8f3c5
test(mcp): pin the live regex diagnostic caret
cursoragent Sep 18, 2026
0647137
test(mcp): prove tracedecay_find_exact_symbol behavior
cursoragent Sep 18, 2026
6b997ea
test(mcp): own exact-symbol ids before the payload assertion
cursoragent Sep 18, 2026
6569374
merge master into cursor/prove-inheritance-depth-7400
cursoragent Sep 18, 2026
71d47d6
test(mcp): prove tracedecay_hermes_skill_bridge behavior
cursoragent Sep 18, 2026
5497664
fix(ci): clear inherited rustfmt and clippy errors
cursoragent Sep 18, 2026
cf2c00f
test(mcp): compile hermes skill bridge file snapshot
cursoragent Sep 18, 2026
48a0639
test(mcp): keep omitted project_list format
cursoragent Sep 18, 2026
9da1d50
style: rustfmt shared lock acquisition chains
cursoragent Sep 18, 2026
cf675d2
fix(privacy): indent the RE2 catalogue continuation
cursoragent Sep 18, 2026
1ee675b
test(mcp): prove tracedecay_feedback_impact behavior
cursoragent Sep 18, 2026
e102600
test(mcp): admit compiler warning so impact publishes
cursoragent Sep 18, 2026
02b57cd
test(mcp): republish the warning on every impact attempt
cursoragent Sep 18, 2026
4e8d3b9
style: clear rustfmt and doc-continuation gates
cursoragent Sep 18, 2026
f4aa8a9
test(mcp): note why rollback replay omits reconciled
cursoragent Sep 18, 2026
74e0326
test(mcp): prove tracedecay_message_search behavior
cursoragent Sep 18, 2026
8a76e38
test(mcp): assert observed message search answers
cursoragent Sep 18, 2026
1d8d019
style: clear rustfmt and privacy doc gates
cursoragent Sep 18, 2026
22af66d
test(mcp): rerun message search proof checks
cursoragent Sep 18, 2026
6de65a9
Merge branch 'master' into cursor/prove-project-context-6659
cursoragent Sep 18, 2026
90e75ea
fix: clear tip rustfmt and doc clippy failures
cursoragent Sep 18, 2026
137824d
ci: retrigger field-sites checks
cursoragent Sep 18, 2026
ab2ea4f
style: clear pinned rustfmt and clippy gates
cursoragent Sep 18, 2026
bcbacef
Merge branch 'master' into cursor/prove-field-sites-behavior-2941
cursoragent Sep 18, 2026
50dfcdd
style: format shared lock matches
cursoragent Sep 18, 2026
c532fb1
fix(privacy): repair the gitleaks rule doc list
cursoragent Sep 18, 2026
709349e
test(mcp): prove tracedecay_fact_store_update behavior
cursoragent Sep 18, 2026
bf81d26
fix(memory): canonicalize labels on fact store update
cursoragent Sep 18, 2026
ce2efec
style: format shared lock matches
cursoragent Sep 18, 2026
5a5a74e
style(privacy): indent the regex catalogue list
cursoragent Sep 18, 2026
69bd6cd
ci: retrigger fact store update checks
cursoragent Sep 18, 2026
6b5051d
style: format shared lock match chains
cursoragent Sep 18, 2026
a9d7392
Merge branch 'master' into cursor/prove-project-search-behavior-7811
ScriptedAlchemy Sep 18, 2026
d6dbfed
merge: update from master
cursoragent Sep 18, 2026
abd3215
merge(master): pick up shared-lock rustfmt fix
cursoragent Sep 18, 2026
a440af0
Merge origin/master into cursor/configuration-unset-mcp-behavior-2e36
cursoragent Sep 18, 2026
4d88076
Merge origin/master into cursor/configuration-unset-mcp-behavior-2e36
cursoragent Sep 18, 2026
68ee311
test(mcp): record the apply touch before the replay
cursoragent Sep 18, 2026
6fcc91d
fix(privacy): restore the regex dialect doc list
cursoragent Sep 18, 2026
aff6478
test(hosts): assert Codex prepare defers without the CLI
cursoragent Sep 18, 2026
7032103
fix(global-db): drop unused session reconcile wrappers
cursoragent Sep 18, 2026
e27d82d
test(code-index): pin codec bytes after extractor revisions
cursoragent Sep 18, 2026
8c01743
Merge origin/master into changelog proof
cursoragent Sep 18, 2026
b796b21
style(mcp): format changelog behavior test
cursoragent Sep 18, 2026
9f681d6
style: match pinned rustfmt on failing gates
cursoragent Sep 18, 2026
c511a6b
Merge origin/master into cursor/prove-tracedecay-context-77d9
cursoragent Sep 18, 2026
c3b2f00
style: format shared locks and indent privacy doc
cursoragent Sep 18, 2026
d7110d7
Merge remote-tracking branch 'origin/master' into cursor/prove-traced…
cursoragent Sep 18, 2026
eaa6a38
fix(ci): clear fmt, docs, and stale selectors
cursoragent Sep 18, 2026
f2d8ec4
merge(master): integrate latest base for unrelated CI fixes
cursoragent Sep 18, 2026
981327b
style(mcp): order affected-tests test modules
cursoragent Sep 18, 2026
508d446
Merge remote-tracking branch 'origin/master' into cursor/prove-traced…
cursoragent Sep 18, 2026
fc112b9
Merge origin/master into cursor/configuration-unset-mcp-behavior-2e36
cursoragent Sep 18, 2026
ea57da0
Merge origin/master into rollback proof
cursoragent Sep 18, 2026
8b91f1b
Merge origin/master into cursor/prove-lcm-status-behavior-16d9
cursoragent Sep 18, 2026
e354e03
ci: start pull request runs for ci-full
cursoragent Sep 18, 2026
2f5366b
merge: update from master
cursoragent Sep 18, 2026
78823f7
fix(ci): clear rustfmt and clippy doc gates
cursoragent Sep 18, 2026
1687935
ci: run the Linux lane for ci-full pull requests
cursoragent Sep 18, 2026
af66c40
Merge branch 'master' into cursor/prove-tracedecay-derives-9d67
ScriptedAlchemy Sep 18, 2026
a930bf2
Merge branch 'master' into cursor/prove-lcm-grep-behavior-b640
ScriptedAlchemy Sep 18, 2026
0195f0d
Merge branch 'master' into cursor/prove-tracedecay-node-bee1
ScriptedAlchemy Sep 18, 2026
e22577c
ci: restore ci-full and clear format gates
cursoragent Sep 18, 2026
d92eb6f
Merge branch 'master' into cursor/prove-lcm-status-behavior-16d9
ScriptedAlchemy Sep 18, 2026
80138d8
test(mcp): prove tracedecay_files behavior
cursoragent Sep 18, 2026
223f645
test(mcp): stop shadowing the files listing helper
cursoragent Sep 18, 2026
6cce950
style: clear rustfmt and privacy doc clippy gates
cursoragent Sep 18, 2026
2b11cb6
Merge branch 'master' into cursor/prove-diagnose-behavior-7553
ScriptedAlchemy Sep 18, 2026
0b979d6
style: format lock helpers and privacy docs
cursoragent Sep 18, 2026
c083c6b
Merge branch 'master' into cursor/prove-port-order-b276
ScriptedAlchemy Sep 18, 2026
d651667
Merge branch 'master' into cursor/prove-source-edit-rollback-7cfc
ScriptedAlchemy Sep 18, 2026
ffeeea9
fix(ci): format lock chains and privacy docs
cursoragent Sep 18, 2026
526d823
Merge branch 'cursor/prove-tracedecay-node-bee1' of https://github.co…
cursoragent Sep 18, 2026
62a8a71
style(privacy): indent catalogue doc continuation
cursoragent Sep 18, 2026
394be57
ci: remove the restored pull_request trigger
cursoragent Sep 18, 2026
7955243
Merge remote-tracking branch 'origin/master' into cursor/prove-diagno…
cursoragent Sep 18, 2026
b1f0821
ci: rerun this head when ci-full is applied
cursoragent Sep 18, 2026
f167059
fix(ci): clear clippy and two typed assertions
cursoragent Sep 18, 2026
95d7ab9
Merge origin/cursor/prove-lcm-status-behavior-16d9 into cursor/prove-…
cursoragent Sep 18, 2026
a3fd473
Merge remote-tracking branch 'origin/master' into cursor/prove-ast-gr…
cursoragent Sep 18, 2026
d82c7ba
ci: start Linux validation when ci-full is applied
cursoragent Sep 18, 2026
7e75057
fix(ci): clear rustfmt and privacy doc-lint failures
cursoragent Sep 18, 2026
462f1bf
ci: keep master's workflow_dispatch entry point
cursoragent Sep 18, 2026
bb9642b
fix(ci): repair fmt, clippy, and typed probes
cursoragent Sep 18, 2026
de1bfa4
fix(privacy): indent dialect doc list continuation
cursoragent Sep 18, 2026
744b4c2
test: re-pin drifted codec and search receipts
cursoragent Sep 18, 2026
4770639
Merge remote rollback branch
cursoragent Sep 18, 2026
f07725b
Merge remote-tracking branch 'origin/cursor/prove-diagnose-behavior-7…
cursoragent Sep 18, 2026
201ffb0
fix(ci): allow the clone-slice lock hold
cursoragent Sep 18, 2026
310fe3e
ci: restore ci-full and clear prove-run blockers
cursoragent Sep 18, 2026
699bf72
ci: drop the restored pull-request trigger
cursoragent Sep 18, 2026
66ff7cd
fix(ci): allow the intentional projection-lock await
cursoragent Sep 18, 2026
79aac67
ci: drop the restored pull_request trigger
cursoragent Sep 18, 2026
1fd2a0b
revert(ci): drop the labeled pull_request trigger
cursoragent Sep 18, 2026
e59259b
fix(ci): allow the freshness test's held slot lock
cursoragent Sep 18, 2026
9fc8b96
fix(code-index): allow freshness lock held across proof await
cursoragent Sep 18, 2026
a5fa668
fix(code-index): hold clone slot off the freshness await
cursoragent Sep 18, 2026
af68630
Merge remote-tracking branch 'origin/master' into cursor/prove-projec…
ScriptedAlchemy Sep 18, 2026
a9d5052
ci: restore workflow_dispatch-only PR runs
cursoragent Sep 18, 2026
3b0194d
test(mcp): isolate changelog git fixtures
ScriptedAlchemy Sep 18, 2026
de63db2
fix(code-index): allow the clone-slot lock across freshness
cursoragent Sep 18, 2026
51402cd
fix(daemon): mount the published branch worktree's query authority
ScriptedAlchemy Sep 18, 2026
65dcaa6
fix(hooks): account an ingest commit apart from its own drain
ScriptedAlchemy Sep 18, 2026
d950c48
merge: PR #1608 test(mcp): prove tracedecay_dependency_depth behavior
ScriptedAlchemy Sep 18, 2026
10082ff
merge: PR #1613 test(mcp): prove tracedecay_unused_imports behavior
ScriptedAlchemy Sep 18, 2026
fa44ed5
fix(pr-1613): collapse the retired-scan refusal to one minimal case
ScriptedAlchemy Sep 18, 2026
272908b
merge: PR #1617 test(mcp): prove tracedecay_derives behavior
ScriptedAlchemy Sep 18, 2026
943f641
fix(pr-1617): share the exact-arguments dispatch instead of widening …
ScriptedAlchemy Sep 18, 2026
1ef523a
merge: PR #1622 test(mcp): prove tracedecay_doc_coverage behavior
ScriptedAlchemy Sep 18, 2026
1cb90d6
merge: PR #1627 test(mcp): prove tracedecay_lcm_status behavior
ScriptedAlchemy Sep 18, 2026
39f2eca
merge: PR #1634 test(mcp): prove tracedecay_message_search behavior
ScriptedAlchemy Sep 18, 2026
6b02254
merge: PR #1635 test(mcp): prove tracedecay_field_sites behavior
ScriptedAlchemy Sep 18, 2026
aec2c65
merge: PR #1643 test(mcp): prove tracedecay_configuration_unset behavior
ScriptedAlchemy Sep 18, 2026
2eca16d
merge: PR #1647 test(mcp): prove tracedecay_find_exact_symbol behavior
ScriptedAlchemy Sep 18, 2026
8ff07bd
merge: PR #1662 test(mcp): prove tracedecay_fact_store_update behavior
ScriptedAlchemy Sep 18, 2026
23b4b18
merge: PR #1665 test(mcp): prove tracedecay_changelog behavior
ScriptedAlchemy Sep 18, 2026
6801bb2
merge: PR #1667 test(mcp): prove tracedecay_analytics behavior
ScriptedAlchemy Sep 18, 2026
e84441e
merge: PR #1686 test(mcp): prove tracedecay_source_edit_rollback beha…
ScriptedAlchemy Sep 18, 2026
c51c70e
merge: PR #1693 test(mcp): prove tracedecay_context behavior
ScriptedAlchemy Sep 18, 2026
2b721ad
merge: PR #1697 test(mcp): prove tracedecay_hermes_skill_bridge behavior
ScriptedAlchemy Sep 18, 2026
ac71b28
merge: PR #1706 test(mcp): prove tracedecay_feedback_list behavior
ScriptedAlchemy Sep 18, 2026
071e935
merge: PR #1707 test(mcp): prove tracedecay_project_context behavior
ScriptedAlchemy Sep 18, 2026
a12162f
fix(pr-1707): sort the project_context_test module declaration
ScriptedAlchemy Sep 18, 2026
4ec9f11
merge: PR #1708 test(mcp): prove tracedecay_feedback_impact behavior
ScriptedAlchemy Sep 18, 2026
032daa8
merge: PR #1726 test(mcp): prove tracedecay_grep behavior
ScriptedAlchemy Sep 18, 2026
f6d66ee
fix(pr-1726): shut the grep fixture harness down at the end of the test
ScriptedAlchemy Sep 18, 2026
39f01b5
merge: PR #1728 test(mcp): prove tracedecay_project_search behavior
ScriptedAlchemy Sep 18, 2026
8301038
merge: PR #1731 test(mcp): prove tracedecay_affected_tests behavior
ScriptedAlchemy Sep 18, 2026
aaf9f2a
merge: PR #1738 test(mcp): prove tracedecay_inheritance_depth behavior
ScriptedAlchemy Sep 18, 2026
3d3f7d0
merge: PR #1740 test(mcp): prove tracedecay_project_list behavior
ScriptedAlchemy Sep 18, 2026
4c5275f
fix(pr-1740): resolve git through common::git_program and sort the mo…
ScriptedAlchemy Sep 18, 2026
08801c8
merge: PR #1747 test(mcp): prove tracedecay_ast_grep_rewrite behavior
ScriptedAlchemy Sep 18, 2026
6c849cb
fix(pr-1747): drop the committed .audit scratch files
ScriptedAlchemy Sep 18, 2026
2e816be
merge: PR #1757 test(mcp): prove tracedecay_files behavior
ScriptedAlchemy Sep 18, 2026
5a31911
merge: PR #1758 test(mcp): prove tracedecay_port_order behavior
ScriptedAlchemy Sep 18, 2026
be87fd9
fix(pr-1758): hold the isolation guard for the whole test body
ScriptedAlchemy Sep 18, 2026
2011289
merge: PR #1765 test(mcp): prove tracedecay_lcm_grep behavior
ScriptedAlchemy Sep 18, 2026
72fbd55
merge: PR #1768 test(mcp): prove tracedecay_node behavior
ScriptedAlchemy Sep 18, 2026
fc7dfe0
fix(pr-1708): use Duration::from_mins for the feedback-owner deadline
ScriptedAlchemy Sep 18, 2026
7d4878d
merge: PR #1633 test(mcp): prove tracedecay_diagnose behavior
ScriptedAlchemy Sep 18, 2026
92b22f7
fix(pr-1633): warm the diagnose fixture through the shared support he…
ScriptedAlchemy Sep 19, 2026
4c2f722
Revert "fix(daemon): mount the published branch worktree's query auth…
ScriptedAlchemy Sep 19, 2026
9dca07d
test(mcp): make the project_search injection probe one token
ScriptedAlchemy Sep 19, 2026
0f94ec9
Merge remote-tracking branch 'origin/master' into ci/pr-batch-b
ScriptedAlchemy Sep 19, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use tracedecay_contracts::feedback::{
feedback_surface_operation,
};
use tracedecay_contracts::{
ApplicationOperation, CancellationContext, CapabilityGrantId, CapabilityGrantSnapshot,
Deadline, DiagnosticProviderDescriptor, DiagnosticProviderIdentity,
ApplicationOperation, ApplicationOutcome, CancellationContext, CapabilityGrantId,
CapabilityGrantSnapshot, Deadline, DiagnosticProviderDescriptor, DiagnosticProviderIdentity,
DiagnosticProviderIdentityParts, DiagnosticProviderResult, DiagnosticProviderState,
DisclosureClass, PolicyDecisionRef, ProviderCoverage, ProviderDocumentIdentity,
ProviderFreshness, ProviderOrigin, ProviderProvenance, ProviderSourceIdentity, RequestContext,
Expand All @@ -39,7 +39,7 @@ use tracedecay_domain::feedback::{
use tracedecay_domain::{
ActorId, CodeGenerationId, CommitId, ComponentVersion, ContentDigest, FileOccurrenceId,
LanguageDescriptorRevision, LanguageId, LocatorDigest, ManifestDigest, ProjectId, ProviderId,
RefId, RepositoryId, RetrievalAnchorId, SourceSpan, UtcMicros, WorktreeId,
RefId, RepositoryId, RetrievalAnchorId, SourceSpan, SymbolOccurrenceId, UtcMicros, WorktreeId,
};
use tracedecay_hooks::{HookFeedbackDeliveryOutcomeV1, HookFeedbackRollbackSwitchV1};
use tracedecay_lsp::{
Expand Down Expand Up @@ -485,7 +485,9 @@ async fn consume_fixture() -> ConsumeFixture {
target: request.input.target.clone(),
affected_files: vec![request.input.target.file.clone()],
affected_callers: Vec::new(),
affected_tests: Vec::new(),
affected_tests: vec![
SymbolOccurrenceId::new("symbol.feedback-entry-test").expect("affected test symbol"),
],
evidence_anchors: Vec::new(),
state: FeedbackImpactStateV1::Complete,
affected_tests_state: FeedbackImpactStateV1::Complete,
Expand Down Expand Up @@ -620,10 +622,21 @@ async fn completed_publication_is_consumed_into_exactly_one_hook_notice() {
)
.await
.expect("project published affected tests");
assert!(matches!(
affected_tests,
crate::feedback::owner::FeedbackReadInvocationResultV1::AffectedTests(Ok(_))
));
let crate::feedback::owner::FeedbackReadInvocationResultV1::AffectedTests(Ok(envelope)) =
affected_tests
else {
panic!("published affected-tests read must return the projection");
};
let ApplicationOutcome::Evidence(evidence) = envelope.outcome else {
panic!("affected-tests projection must be evidence, not a problem or effect");
};
let payload = evidence.payload.expect("affected-tests payload");
assert_eq!(
payload.affected_tests,
vec![SymbolOccurrenceId::new("symbol.feedback-entry-test").expect("affected test symbol")]
);
assert_eq!(payload.state, Some(FeedbackImpactStateV1::Complete));
assert!(payload.evidence_anchors.is_empty());
let listed = fixture
.registration
.feedback_owner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,12 @@ pub fn canonical_record_completion_micros(record: &AutomationRunLedgerRecord) ->
.map(|(_, completed_at_micros)| completed_at_micros)
}

pub(super) fn canonical_record_started_at_seconds(
/// Schema-aware start instant in Unix seconds.
///
/// Schema v1 rows store RFC3339. Schema v2 rows store nonnegative Unix
/// seconds. Callers that window the ledger, including analytics, must use
/// this instead of assuming one textual form.
pub fn canonical_record_started_at_seconds(
record: &AutomationRunLedgerRecord,
label: &str,
) -> Result<i64> {
Expand Down
7 changes: 4 additions & 3 deletions crates/tracedecay-mcp/src/handlers/analytics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ use tracedecay_domain::{FactOwnerV1, ObservationScopeV1, ProjectId};
use tracedecay_session_memory::memory::MemoryApplication;
use tracedecay_store::{FactReadControl, StoreShardScopeV1};

use tracedecay_automation_runtime::automation::run_ledger::load_run_records;
use tracedecay_automation_runtime::automation::run_ledger::{
canonical_record_started_at_seconds, load_run_records,
};
use tracedecay_daemon_service::retained_owner::open_project_retained_memory_target;
use tracedecay_domain::errors::{Result, TraceDecayError};
use tracedecay_global_db::{AnalyticsToolCounts, RegisteredGlobalDb};
use tracedecay_project::project::TraceDecay;
use tracedecay_project::project::current_timestamp;
use tracedecay_runtime_core::timeutil::parse_rfc3339_timestamp;
use tracedecay_session_memory::fact_store::DatabaseFactStore;
use tracedecay_store_runtime::retained_memory::MemoryTargetAccessV1;

Expand Down Expand Up @@ -793,7 +794,7 @@ async fn automation_section(project_root: &Path, since: i64) -> Value {
let mut in_window = 0usize;
let mut by_job: BTreeMap<String, BTreeMap<&'static str, i64>> = BTreeMap::new();
for record in &records {
if let Some(started_at) = parse_rfc3339_timestamp(&record.started_at)
if let Ok(started_at) = canonical_record_started_at_seconds(record, "analytics window")
&& started_at < since
{
continue;
Expand Down
17 changes: 15 additions & 2 deletions crates/tracedecay-session-memory/src/fact_store/crud/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,21 @@ async fn update_project_memory_fact_with_cas_tx(
.patch()
.source_label()
.unwrap_or_else(|| previous_payload.source_label());
let Some(sanitized) =
sanitize_payload(content, category, tags, entities, metadata, source_label)?
// The operation digest above keeps the caller's label order so a retry is
// the same update. Stored payloads hash labels in canonical order; the
// sanitizer receipt must see that order or the write is rejected.
let mut canonical_tags = tags.to_vec();
let mut canonical_entities = entities.to_vec();
canonical_tags.sort_unstable();
canonical_entities.sort_unstable();
let Some(sanitized) = sanitize_payload(
content,
category,
&canonical_tags,
&canonical_entities,
metadata,
source_label,
)?
else {
return Err(storage_message(
PROJECT_MEMORY_WRITE_OPERATION,
Expand Down
1 change: 1 addition & 0 deletions crates/tracedecay/src/daemon/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use super::{

mod bootstrap;
mod code_index_hydration;
mod feedback_impact;
mod handshake;
mod invocation_ownership;
mod lifecycle;
Expand Down
Loading
Loading