Repository navigation
SDK evidence traceability and context-integrity primitives - #872
Conversation
Deliver indexed CLI/SDK/MCP reverse file lookup, atomic files/docs replacement, idempotent linked evidence, precise telemetry drain receipts, lock-collision diagnostics, issue-code suffix identity, Windows path portability, and atomic history-redaction projection refresh.\n\nAdd generated contracts and public surface snapshots, agent-focused documentation, latest pm-changelog provenance, PM lineage, isolated packed npm/Bun acceptance, and regression coverage preserving the repository-wide 100/100/100/100 gate.
Resolve workspace and requested absolute paths through filesystem identity before deriving project-relative lookup keys. This closes the Windows drive alias/casing gap discovered by the hosted nightly while preserving source-scan and indexed lookup semantics.\n\nRecord the failed hosted evidence and corrected full 100% verification on the canonical traceability and portability PM items.
Build the global linked-file fixture from os.tmpdir() so the SDK lookup contract receives an absolute external path on Windows, macOS, and Linux. The previous /tmp literal was relative on Windows and invalidated the portability assertion.
Record exact-head cross-platform evidence, close and release seven completed issue items, return the broader line-level traceability feature to open, and regenerate CHANGELOG.md with pm-changelog 2026.8.2.\n\nThe tracker now has zero in-progress items, zero history drift, no active graph isolates, and preserves the existing 295-item historical resolution-debt baseline.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Reviewer's GuideAdds reverse linked-file lookup, atomic evidence replacement, and stricter integrity/telemetry primitives across CLI, SDK, MCP, and metadata indexing, plus documentation and tests for the new context-integrity contracts. Sequence diagram for reverse files lookup runtimesequenceDiagram
actor User
participant CliFilesLookup as pm_files_lookup_command
participant SdkFiles as runFilesLookup
participant Index as queryLinkedFileMetadataIndex
participant Store as listAllItemMetadata
User->>CliFilesLookup: pm files lookup <paths...>
CliFilesLookup->>SdkFiles: runFilesLookup(options, global)
SdkFiles->>SdkFiles: normalizeFilesLookupPaths(paths, workspaceRoot)
SdkFiles->>SdkFiles: resolveItemTypeRegistry(settings, getActiveExtensionRegistrations)
SdkFiles->>SdkFiles: resolveFilesLookupWindow(options)
SdkFiles->>Index: queryFilesLookupIndex(pmRoot, type_to_folder, paths, scope, limit, offset, strictRead, noTruncate)
alt indexed result available
Index-->>SdkFiles: LinkedFileMetadataIndexResult
SdkFiles-->>CliFilesLookup: FilesLookupResult { source:index, completeness.status:unchecked }
else index missing_or_unusable
SdkFiles->>Store: listAllItemMetadata(pmRoot, item_format, type_to_folder, warnings, schema)
Store-->>SdkFiles: ItemMetadata[]
SdkFiles->>SdkFiles: queryFilesLookupSource(pmRoot, settings, type_to_folder, paths, scope, limit, offset, strictRead)
SdkFiles-->>CliFilesLookup: FilesLookupResult { source:source_scan, completeness.status:complete|partial }
end
CliFilesLookup-->>User: FilesLookupResult (paths, total, matches, has_more, truncated)
Sequence diagram for history-redact with derived index refreshsequenceDiagram
actor User
participant CliHistoryRedact as runHistoryRedact
participant HistoryRewrite as executeHistoryRewrite
participant IndexLock as acquireItemMetadataDerivedIndexLock
participant DriftCache as invalidateHistoryDriftCacheForPath
participant MetadataIndex as refreshItemMetadataDerivedIndex
participant Fs as writeFileAtomic
User->>CliHistoryRedact: pm history redact <id> ...
CliHistoryRedact->>HistoryRewrite: executeHistoryRewrite({ applyRewrite, applyPostRewrite })
HistoryRewrite->>IndexLock: acquireItemMetadataDerivedIndexLock(pmRoot, author)
IndexLock-->>HistoryRewrite: releaseDerivedIndexLock
HistoryRewrite->>Fs: writeFileAtomic(nextItem.path, nextItem.raw)
HistoryRewrite->>Fs: fs.rm(currentItem.path)
HistoryRewrite->>Fs: writeFileAtomic(subject.historyPath, historyEntriesToRaw(rewrittenEntries))
alt write failure
HistoryRewrite->>Fs: rollbackHistoryRedactRewrite(subject.historyPath, historyRawUnderLock, affectedItemPaths, itemSnapshots)
HistoryRewrite->>DriftCache: invalidateHistoryDriftCacheForPath(subject.historyPath)
HistoryRewrite-->>CliHistoryRedact: error
else write success
HistoryRewrite->>DriftCache: invalidateHistoryDriftCacheForPath(subject.historyPath)
HistoryRewrite->>MetadataIndex: refreshItemMetadataDerivedIndex({... itemPath, previousItemPath, document })
MetadataIndex-->>HistoryRewrite: derivedIndexWarnings[]
HistoryRewrite->>IndexLock: releaseDerivedIndexLock()
HistoryRewrite-->>CliHistoryRedact: rewrittenEntries + derivedIndexWarnings
end
CliHistoryRedact-->>User: history-redact result with projection in sync
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (55)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR adds indexed reverse linked-file lookup across the CLI, SDK, MCP, and metadata index. It also adds atomic file/document replacement, no-op mutation handling, history-redaction cache coordination, typed telemetry receipts, issue-classification fixes, public contracts, tests, documentation, and PM records. ChangesSDK reverse lookup
Mutation and integrity fixes
Typed results and classification
Documentation and release records
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant PmClient
participant runFilesLookup
participant MetadataIndex
participant AuthoritativeMetadata
Client->>PmClient: filesLookup(options)
PmClient->>runFilesLookup: dispatch lookup request
runFilesLookup->>MetadataIndex: query indexed linked files
MetadataIndex-->>runFilesLookup: matches or unavailable result
runFilesLookup->>AuthoritativeMetadata: scan when index is stale, strict, or unsuitable
AuthoritativeMetadata-->>runFilesLookup: matching items and completeness
runFilesLookup-->>PmClient: FilesLookupResult
PmClient-->>Client: return lookup result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@greptileai please review this exact head. |
|
@coderabbitai full review |
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 59 minutes. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 9
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/sdk/lifecycle/update.ts (1)
1531-1603: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winRoute
--replace-teststhrough the new shared validator.
validateLinkedArtifactReplacementnow covers--replace-filesand--replace-docs. The inline block at lines 1573-1587 for--replace-testsperforms exactly the same two checks with the same message templates. Call the helper there as well.--replace-depscannot use it, because it pairs with--dep-removeinstead of a clear flag.This keeps the four replacement flags on one validation path and prevents the messages from diverging.
♻️ Proposed refactor
- if ( - options.replaceTests === true && - (options.test === undefined || options.test.length === 0) - ) { - throw new PmCliError( - "--replace-tests requires at least one --test entry", - EXIT_CODE.USAGE, - ); - } - if (options.replaceTests === true && options.clearTests === true) { - throw new PmCliError( - "--replace-tests cannot be combined with --clear-tests", - EXIT_CODE.USAGE, - ); - } + validateLinkedArtifactReplacement({ + enabled: options.replaceTests === true, + values: options.test, + replaceFlag: "--replace-tests", + clearEnabled: options.clearTests === true, + clearFlag: "--clear-tests", + valueFlag: "--test", + }); validateLinkedArtifactReplacement({ enabled: options.replaceFiles === true,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/sdk/lifecycle/update.ts` around lines 1531 - 1603, Update validateReplaceOptions to remove the inline --replace-tests validation and route it through validateLinkedArtifactReplacement, passing the test values and the corresponding replace, clear, and value flags. Leave the --replace-deps checks unchanged because they use --dep-remove rather than a clear flag.src/sdk/linked-artifacts.ts (1)
685-716: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winEnsure migration counts do not produce a positive
migrations_appliedwhenchangedstays false.
applyLinkedArtifactMigrationscounts any successful path rewrite innext, butmergeLinkedArtifactChangesand dedupe can still leave the linked-artifact metadata equivalent to the originalcurrentsnapshot. Sinceresult.changedis derived only fromchangedFields.includes(metadataKey), use a delta-aware migration counter or include migration warnings only when the final metadata differs.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/sdk/linked-artifacts.ts` around lines 685 - 716, Update the warning construction in the mutate handler around applyLinkedArtifactMigrations and mergeLinkedArtifactChanges so migrations_applied is emitted only when the final normalized metadata differs from current and changedFields includes metadataKey. Preserve the existing migration count for genuinely changed metadata, but suppress the warning when deduplication or merging leaves the document unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Around line 5-13: Add an Unreleased Added changelog section before the
existing Fixed section, documenting GH-861 and the public reverse linked-file
lookup capability exposed through pm files lookup, the SDK, and MCP. Preserve
all existing Fixed entries unchanged.
In `@src/cli/register-files-lookup.ts`:
- Around line 25-46: Update runFilesLookupAction to validate options.scope
before constructing the runFilesLookup request: accept only "project", "global",
or undefined, and throw PmCliError for any other value instead of passing
undefined. Preserve the existing valid-scope behavior and ensure invalid values
prevent the lookup from running.
In `@src/core/store/item-metadata-query-index.ts`:
- Around line 596-599: Update the loop over itemRows in the item metadata query
to use the selected items.id value as the key for filesByItem, rather than
item.id from parsed metadata_json; preserve the parsed metadata for the returned
item. Adjust the existing context-management test expectation to verify files
are joined using the authoritative row ID.
In `@src/sdk/history-redact.ts`:
- Around line 692-694: Update the finally block surrounding the rewrite/rollback
flow to guard the await of releaseDerivedIndexLock so a release rejection cannot
replace the original rewrite error; preserve the existing rethrow behavior for
the write failure while handling any lock-release failure without propagating it
from finally.
In `@src/sdk/lifecycle/update.ts`:
- Around line 2355-2364: Update the metadata handling around the replace branch
so empty linked-artifact replacements from replaceFiles/replaceDocs are deleted
rather than assigned undefined. Account for parseFiles results with values
undefined and explicitEmpty false, while preserving normal replacement
assignment and existing clear-item behavior.
In `@src/sdk/test/execution.ts`:
- Around line 105-108: Update hasInfraCollisionSignal to evaluate
LINKED_TEST_LOCK_ACQUISITION_PATTERN and
LINKED_TEST_LOCK_CONTENTION_CONTEXT_PATTERN against each individual line of the
combined failure output, returning true only when both match the same line;
preserve the existing false result when no single line contains both signals.
In `@tests/unit/commands/validate-command.spec.ts`:
- Line 2437: Update the test setup’s resolveItemTypeRegistry call to pass
getActiveExtensionRegistrations() as its second argument, matching runValidate’s
registry construction and ensuring the cache uses the same active extension item
types and folder mapping.
- Around line 2466-2471: Update the test around applyHistoryRedactRewrite to
positively read history-drift-cache.json and verify it exists before invoking
redaction, then retain the existing ENOENT assertion afterward to verify
removal. Ensure the test fails if cache creation or invalidation is omitted.
In `@tests/unit/sdk/context-management-primitives.spec.ts`:
- Around line 272-280: Validate the --scope option in registerFilesLookupCommand
before invoking runFilesLookupAction, accepting only project and global values
and rejecting unsupported values with EXIT_CODE.USAGE. Update the affected
assertions for unsupported, global, and related invalid-scope cases to expect
the validation rejection rather than unfiltered lookup results.
---
Outside diff comments:
In `@src/sdk/lifecycle/update.ts`:
- Around line 1531-1603: Update validateReplaceOptions to remove the inline
--replace-tests validation and route it through
validateLinkedArtifactReplacement, passing the test values and the corresponding
replace, clear, and value flags. Leave the --replace-deps checks unchanged
because they use --dep-remove rather than a clear flag.
In `@src/sdk/linked-artifacts.ts`:
- Around line 685-716: Update the warning construction in the mutate handler
around applyLinkedArtifactMigrations and mergeLinkedArtifactChanges so
migrations_applied is emitted only when the final normalized metadata differs
from current and changedFields includes metadataKey. Preserve the existing
migration count for genuinely changed metadata, but suppress the warning when
deduplication or merging leaves the document unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2c545309-44c1-4e5f-9605-3169672f2bc6
📒 Files selected for processing (52)
.agents/pm/extensions/.managed-extensions.json.agents/pm/features/pm-f86lth.toon.agents/pm/history/pm-2irc1p.jsonl.agents/pm/history/pm-cstuys.jsonl.agents/pm/history/pm-f86lth.jsonl.agents/pm/history/pm-jb1ron.jsonl.agents/pm/history/pm-rusbe4.jsonl.agents/pm/history/pm-sn3xor.jsonl.agents/pm/history/pm-u5c27w.jsonl.agents/pm/history/pm-wnbk2l.jsonl.agents/pm/issues/pm-2irc1p.toon.agents/pm/issues/pm-cstuys.toon.agents/pm/issues/pm-jb1ron.toon.agents/pm/issues/pm-rusbe4.toon.agents/pm/issues/pm-sn3xor.toon.agents/pm/issues/pm-u5c27w.toon.agents/pm/issues/pm-wnbk2l.toonCHANGELOG.mdREADME.mddocs/README.mddocs/SDK_EVIDENCE_TRACEABILITY.mdsdk/public-surface.jsonsrc/cli/register-files-lookup.tssrc/cli/register-mutation.tssrc/core/store/item-metadata-cache.tssrc/core/store/item-metadata-query-index.tssrc/sdk/cli-contracts/completeness.tssrc/sdk/cli-contracts/flag-contracts.tssrc/sdk/cli-contracts/registration-helpers.tssrc/sdk/cli-contracts/tool-option-contracts.tssrc/sdk/cli-contracts/tool-parameter-tables.tssrc/sdk/cli-contracts/tool-schema.tssrc/sdk/completion.tssrc/sdk/files.tssrc/sdk/history-redact.tssrc/sdk/index.tssrc/sdk/item-metadata-index.tssrc/sdk/lifecycle/legacy-none-tokens.tssrc/sdk/lifecycle/update-many.tssrc/sdk/lifecycle/update.tssrc/sdk/linked-artifacts.tssrc/sdk/runtime.tssrc/sdk/similarity-scoring.tssrc/sdk/telemetry.tssrc/sdk/test/execution.tstests/fixtures/contracts/full.jsontests/types/sdk-evidence-traceability.test-d.tstests/unit/commands/validate-command.spec.tstests/unit/sdk/action-schema-parity.spec.tstests/unit/sdk/context-management-primitives.spec.tstests/unit/sdk/runtime-extended-actions.spec.tstests/unit/sdk/similarity.spec.ts
Validate reverse lookup scope, preserve authoritative index joins, constrain lock-contention classification, keep history-redact error precedence, and suppress no-op migration receipts. Reuse shared replacement validation, add regression coverage, regenerate package-owned changelog ordering, and calibrate measured agent token budgets for the expanded SDK/CLI/MCP surfaces.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/sdk/history-redact.ts (1)
626-629: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winRequire the derived-index lock for history redaction.
acquireItemMetadataDerivedIndexLockreturns a no-op release when the manifest is absent or below the index threshold unlessrequired: trueis set. A history redaction can then interleave with an item mutation and lose a derived-index update.Pass
{ required: true }to this acquisition.Proposed fix
const releaseDerivedIndexLock = await acquireItemMetadataDerivedIndexLock( params.pmRoot, params.author, + { required: true }, );🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/sdk/history-redact.ts` around lines 626 - 629, Update the acquireItemMetadataDerivedIndexLock call in the history redaction flow to pass the required option, ensuring the derived-index lock is always acquired even when the manifest is absent or below the index threshold..agents/pm/features/pm-f86lth.toon (1)
73-92: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winLink
CHANGELOG.mdtopm-f86lth.
CHANGELOG.mdis modified in this PR, butdocs[]only includesdocs/README.md,docs/SDK_EVIDENCE_TRACEABILITY.md, and rootREADME.md. Add the changelog through the PM CLI as a project-owned generated document; do not edit.agents/pmdirectly.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.agents/pm/features/pm-f86lth.toon around lines 73 - 92, Update the PM feature metadata for pm-f86lth to include CHANGELOG.md in the project-owned generated docs/files collection. Register it through the PM CLI so the generated .agents/pm content is refreshed, without editing .agents/pm directly; preserve the existing documentation entries.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.agents/pm/features/pm-f86lth.toon:
- Around line 73-92: Update the PM feature metadata for pm-f86lth to include
CHANGELOG.md in the project-owned generated docs/files collection. Register it
through the PM CLI so the generated .agents/pm content is refreshed, without
editing .agents/pm directly; preserve the existing documentation entries.
In `@src/sdk/history-redact.ts`:
- Around line 626-629: Update the acquireItemMetadataDerivedIndexLock call in
the history redaction flow to pass the required option, ensuring the
derived-index lock is always acquired even when the manifest is absent or below
the index threshold.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 7ad6495c-2314-464b-b4c6-bd1350e379b6
📒 Files selected for processing (22)
.agents/pm/features/pm-f86lth.toon.agents/pm/history/pm-2irc1p.jsonl.agents/pm/history/pm-cstuys.jsonl.agents/pm/history/pm-f86lth.jsonl.agents/pm/history/pm-jb1ron.jsonl.agents/pm/history/pm-wnbk2l.jsonl.agents/pm/issues/pm-2irc1p.toon.agents/pm/issues/pm-cstuys.toon.agents/pm/issues/pm-jb1ron.toon.agents/pm/issues/pm-wnbk2l.toonCHANGELOG.mdscripts/agent-token-surface-baseline.jsonsrc/cli/register-files-lookup.tssrc/core/store/item-metadata-query-index.tssrc/sdk/history-redact.tssrc/sdk/lifecycle/update.tssrc/sdk/linked-artifacts.tssrc/sdk/test/execution.tstests/unit/commands/files-docs-command.spec.tstests/unit/commands/history-activity-command.spec.tstests/unit/commands/validate-command.spec.tstests/unit/sdk/context-management-primitives.spec.ts
|
First review-loop disposition at exact head baee50a:
Verification after corrections: 418 files / 6,704 tests, exact 100/100/100/100 coverage, zero clones, 100% docstrings, static/package/SDK/context gates green, and the measured 96-surface token budget green. |
|
@greptileai please review exact head baee50a. @coderabbitai full review @sourcery-ai review exact head baee50a. |
|
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 52 minutes. |
|
Exact-head review follow-up: all nine CodeRabbit confirmations have been individually acknowledged and their threads remain resolved. The requested second full CodeRabbit pass reported completion but was limited by the repository fair-usage quota; this is recorded as a service limitation, not a code finding. Sourcery completed its exact-head review successfully, and the complete required check suite is green on |
Outcome
Ships a cohesive SDK/CLI context-integrity tranche: indexed source-to-item evidence lookup, atomic evidence replacement, truthful no-op and telemetry receipts, reliable linked-test classification, duplicate identity preservation, Windows portability, and transactional history-redaction cache refresh.
This advances the project philosophy that project management = context management by making evidence discoverable and safe to maintain through the same typed primitives across CLI, SDK,
PmClient, one-shot actions, and MCP.Major changes
pm files lookup <path...>reverse traceability with cursor-bound SQLite projection, incremental refresh, pagination, strict/source-scan completeness receipts, absolute-path canonicalization, and CLI/SDK/MCP parity.--replace-filesand--replace-docsupdate contracts, including bulk preview, completions, guarded argv vocabulary, rollback behavior, and generated schemas.queue_entries_drained,queue_progressed,queue_empty, and completion-correctqueue_drained.infra_collisionwhile retaining real assertions asassertion_failure.history-redactwith metadata-index refresh and drift-cache invalidation on commit and rollback.pm-changelog2026.8.2.Canonical PM lineage
Verification
pnpm smoke:npxpasses the generated tarball across all 15 packaged modules.changed=false.pnpm changelog:pm:check, history verification, and graph audit pass with zero drift and zero active isolates. Existing historical resolution debt remains unchanged at 295 items.Release boundary
The immutable automatic release
v2026.8.2already exists for 2026-08-02, so this PR must not create or move a second same-day auto release. The merged changes are eligible for the next daily auto release; packed npm/Bun consumer acceptance supplies pre-publication proof.Closes #779
Closes #861
Closes #865
Closes #866
Closes #867
Closes #868
Closes #870
Closes #871
Summary by Sourcery
Introduce reverse source-to-item evidence lookup, atomic linked-file/doc replacement, and more precise telemetry, test, and similarity governance across CLI, SDK, PmClient, one-shot actions, and MCP.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores:
Summary by cubic
Adds reverse source-to-item lookup and hardens evidence integrity across the SDK and CLI. Enables atomic evidence updates, precise telemetry receipts, and consistent indexing/history across platforms.
New Features
pm files lookup <path...>: indexed reverse traceability with pagination, strict/source-scan receipts, scope validation, authoritative index joins with source-read fallback, and absolute-path canonicalization; available via CLI,filesLookup,runFilesLookup, andPmClient.filesLookup.--replace-filesand--replace-docs; duplicate adds are true no-ops and do not write history or migration receipts.docs/SDK_EVIDENCE_TRACEABILITY.md.Bug Fixes
queue_entries_drained,queue_progressed, andqueue_empty;queue_drainedis true only when empty; exposesTelemetryStatusSummaryandTelemetryFlushResult.infra_collision(notassertion_failure).history-redactrefreshes the derived metadata index and invalidates drift cache atomically on commit/rollback, and preserves error precedence.Written for commit baee50a. Summary will update on new commits.