Skip to content

Sync 2 Inkeep OSS Changes#712

Merged
inkeep-oss-sync[bot] merged 2 commits into
mainfrom
copybara/sync
Jul 20, 2026
Merged

Sync 2 Inkeep OSS Changes#712
inkeep-oss-sync[bot] merged 2 commits into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Copybara-translated 2 Inkeep OSS changes. Rebase-merge this PR so the prepared commits land directly on public main.

Commits:

  • refactor(app): FileTree pure-helper extraction and row lookup map (#2733)
  • feat(open-knowledge): bundle checkpoint refs, agent effects, drop counts (#2735)

…733)

* refactor(app): extract FileTree pure helpers, icon sprite, and row lookup map

Move the pure tree-path helper functions and the Lucide sprite-sheet
generation out of FileTree.tsx into sibling modules, merge the three
navigate*WithPulse variants into one discriminated-union function, and
replace renderRowDecoration's per-row linear scans of the document list
with an O(1) Map lookup derived once per document-list change.

* test(app): add file-tree-path-helpers unit tests; fix purity JSDoc

Address review feedback on the FileTree extraction:
- Tighten the module-level purity claim in file-tree-path-helpers.ts to note
  isEditableKeyboardTarget performs a DOM read (target.closest).
- Add co-located file-tree-path-helpers.test.ts covering the two load-bearing
  invariants the reviewer flagged: buildRowDecorationIndex first-entry-wins on
  key collision (matching the Array.find scans it replaced) and
  deleteTargetCoversPendingCreate's file/asset/folder branches, plus the pure
  string helpers (parse/extension/agent/alternate-sibling) and
  selectedTreePathsToDeleteTargets dedup/.ok-exclusion/folder-containment.

GitOrigin-RevId: 20f65ccbf6006f3a48e0c19ec8b1e009b7f9577f
…nts (#2735)

* feat(diagnose): bundle checkpoint refs, agent effects, log drop counts

Full-tier bundles now stage the shadow repo's refs/checkpoints listing
(state/checkpoint-refs.txt, subjects only) and a state/agent-effects.json
snapshot from the new loopback-only GET /api/metrics/agent-effects
endpoint, which summarizes the per-doc agent-effects ring buffers as
character counts across loaded docs. Doc names in the new artifacts ride
the doc.name key so the existing --redact pass anonymizes them.

The web client log forwarder counts entries lost to buffer overflow or
failed POSTs and carries droppedSinceLastFlush on the next delivered
batch; the server persists it as an explicit gap-marker log line. A
failed recovery-checkpoint write in the server observers also emits a
pino line with doc and branch context alongside the existing warn.

* fix(diagnose): register agent-effects handler, redact presence, clamp drop count

Address review feedback and the shard2 conflict-gate regression:

- Register handleMetricsAgentEffects as exempt in the conflict-gate route
  registry meta-test (GET, non-mutating; mirrors handleMetricsAgentPresence).
  This is the integration:shard2 failure.
- Hash the agent-presence bundle's currentDoc path in the redactor so a
  redacted state/agent-presence.json no longer leaks the doc a person edited.
- Clamp droppedSinceLastFlush at zero on the success path so concurrent
  in-flight flushes cannot drive the counter negative and suppress the next
  gap marker.
- Include the failing doc name in the agent-effects handler catch log.
- Update the stale "Eight handlers" inventory comment to nine.
- Add tests: currentDoc redaction (real presence wire shape + null case) and
  a sustained-failing-burst drop-count storm case.

GitOrigin-RevId: 636f941afb2bfd899d3389963d31e64066247ed3
@inkeep-oss-sync
inkeep-oss-sync Bot merged commit a8072a2 into main Jul 20, 2026
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch July 20, 2026 20:11
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.

1 participant