Skip to content

fix(knowledge): backport 0.12.1 folder scan status and sync-failed notice - #33216

Merged
buluoray merged 4 commits into
release/0.12.0from
crew/slack/0.12.1-source-sync-notice
Nov 8, 2026
Merged

buluoray merged 4 commits into
release/0.12.0from
crew/slack/0.12.1-source-sync-notice

Conversation

@buluoray

@buluoray buluoray commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Bring the main fixes #30884 (keep a folder source syncing until its scan ends) and #33166 (say a source's sync failed under its error badge) onto release/0.12.0 for 0.12.1.

Why it matters

Fix What a 0.12.0 user sees today Faulty code on release
#30884 After Start Scanning on a folder source, the badge says "Up to date" a few seconds in while most files are still queued, and the row keeps stale item and file counts until a page reload. knowledge/folder_watcher.py, website/src/pages/knowledge/SourcesList.tsx
#33166 A source whose sync failed shows only a red Error badge, with nothing saying what went wrong. website/src/pages/knowledge/SourcesList.tsx

Not a goal

  • No fix that is not already merged on main; nothing is changed only here.
  • No version bump, no tag, no CHANGELOG.md change.

What changed (motivation → approach → change)

Four main commits were cherry-picked with -x onto release/0.12.0 @ 80d6211963, in main order.

# Fix main commit release commit
1 keep a folder source syncing until its scan ends (#30884) b978d3054e 7c918b3d5d
2 say a source's sync failed under its error badge (#33166) fa9e328aae f843bfd9e3
3 keep a scanning source syncing when one file fails (#33223) 02b65bc9db 0d9611f352
4 translate the syncing badge on a scanning source (#33328) d924344262 44938c9a03

#30884 applied cleanly and keeps its author. #33166 conflicted only on context: on main its new lines sit next to the Bedrock KB last-search notice and its grant_* / last_search_* / pending_import_budget keys, which release/0.12.0 does not carry. The resolution keeps the release side and adds only #33166's own lines: the source-sync-error notice block in SourcesList.tsx and one sync_failed_notice key per locale. git diff 7c918b3d5d f843bfd9e3 matches main's #33166 diff line for line (15 files, +77, nothing removed).

#33223 applied cleanly. It closes a case the first two picks left open: a folder scan in which one file fails marks the source error while the scan is still running, so the row showed the failure mid-scan and polling stopped. A scanning error row now reads as syncing until the scan ends.

#33328 applied cleanly. A scanning row's badge showed the raw English word "syncing" in every locale because the status label table had no syncing entry; it now shows the translated status.syncing label in all 12 locales.

Backwards compatibility

Compatible: #30884 keeps the row's status at syncing while a scan runs; #33166 adds one notice and one i18n key; #33223 changes only how a scanning error row displays; #33328 adds one label entry and one i18n key.

Removes nothing: no setting, key or caller is removed.

Tests

Proof: not provable -- other: a backport of main commits whose proof ran on main

  • test/test_knowledge_source_spend.py: 17 passed.
  • tsc --noEmit -p tsconfig.app.json passes.
  • vitest SourcesList.syncError, SourcesListCoverage, KnowledgeUtilsCov80, KnowledgeIndexCoverage: 105 passed.
  • vitest src/i18n: 70 files, 1194 passed; check-i18n-strings and gen-ui-index --check pass.

Manual verification

N/A - both fixes were verified on main; the screenshots below are the #33166 row rendering. The 0.12.1 RC soak is the end-to-end check.

Screenshots / video

The Sources list with stubbed /api/knowledge/sources: one local_file source in error, one url source synced, rendered from the #33166 code this PR carries. The errored row keeps its red Error badge and shows the notice with its "Ask the agent" hand-off under the row; the synced row has none.

Dark, 1280 px:

Errored source row, dark

Light 1280 px, dark 390 px

Errored source row, light

Errored source row, mobile

Related Issues

Backport to the 0.12 line for 0.12.1 of #30884, #33166, #33223 and #33328.

Sibling sweep

Siblings: none -- this PR only carries fixes already on main.

Pattern harvest

Not generalizable: this PR only carries fixes already on main.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

bolichen97 and others added 2 commits November 8, 2026 14:10
)

Co-authored-by: w <w@k.local>
(cherry picked from commit b978d30)
)

A source whose sync failed showed only a red Error badge, with nothing
saying what went wrong. Keep the badge as the row's status and add a
compact inline ErrorNotice under the row, with the agent hand-off on
while the add form is closed, like the row's other notices. Sources
store no error text, so the notice uses a fixed message, translated in
all 12 locales.

(cherry picked from commit fa9e328)
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 8, 2026 14:19
@buluoray
buluoray requested review from Zedmor and removed request for a team November 8, 2026 14:19
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 44938c9a03e2ca17afa15cb45593f36c7dd22a76 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing the "Syncing" badge on a folder source mid-scan. It is one of the two states this PR exists to ship, and none of the three screenshots shows it.

Evidence gaps

  • "Syncing" badge on a scanning folder row. displaySyncStatus makes a local_folder row with scanning: true show the new status.syncing label ("Syncing") while the scan runs. Before this PR, a scanning row read "Up to date" and an error row read "Error". shot-01, shot-02 and shot-03 show only "Error" and "Up to date", so the blind reader never saw the new state. To close the gap, attach a screenshot of the Sources list during a folder scan, with the row's badge reading "Syncing", ideally next to a finished row.

Notes

  • The blind reader read the notice correctly ("explains the Error pill") but added "It says it failed but not why." Sources store no error text, so "Ask the agent" is the user's only way forward. Its rating was "a guess" ("whether the assistant would change things without asking me"). A clearer label would be "Ask the agent why it failed".

[UX-REVIEWED] 44938c9

Description read

[DESCRIPTION-READ] af33a48d7effc2e7cbfcb55145b586a4fae1c85096b2d267026b345bf3e6d30e

That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 44938c9a03e2ca17afa15cb45593f36c7dd22a76 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: these are backports of fixes already merged on main, and the lock-snapshot scanning flag fixes the badge where the status is read.

Notes

  • The description says it carries three cherry-picks and "one sync_failed_notice key per locale". The diff also adds a status.syncing label in every locale and changes the syncStatusLabel('syncing') pin, which is the HEAD commit "translate the syncing badge on a scanning source". Add that commit to the table, and reconcile the commit count with the "At most two commits" checkbox.
  • list_sources reads getattr(watcher, "_folder_watcher", None), which is a private attribute of the knowledge watcher. On main, a public accessor would stop a rename of that attribute from silently turning every row into scanning: false. That belongs in a follow-up, not this backport.

[DESIGN-REVIEWED] 44938c9

Description read

[DESCRIPTION-READ] b7c4e70d1acf647db1a7faa96c270883d31dd7c28338169f4e74cf3da78812f3

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 44938c9a03e2ca17afa15cb45593f36c7dd22a76 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. Every item is a cherry-pick from main that fixes a status a 0.12.0 user sees today. One of those picks is missing from the description.

Notes

  • Item 6 — undeclared: commit 44938c9a ("translate the syncing badge on a scanning source", cherry-picked from d9243442) is not in the description's three-row pick table. It also changes the pin syncStatusLabel('syncing') → 'syncing' to 'not_a_status'. That pin only used syncing as an example of an unknown status, and the new example keeps what it tested, so no decision is reversed.

What this change ships

Inventory (6 items) — 5 justified

Intent: bring two main fixes for Knowledge source status onto 0.12.1, so a folder scan doesn't say "Up to date" too early and a failed sync says it failed. This is a FIX.

  1. A folder source's badge stays "Syncing" until its scan actually ends — justified
  2. The Sources list and the Knowledge page keep polling, and refresh counts, until the scan ends — justified
  3. Rows from /api/knowledge/sources carry a new scanning flag — justified
  4. A failed source shows "The last sync of this source failed." with an Ask-the-agent hand-off — justified
  5. A scanning row where one file failed reads Syncing until the scan ends (fix(knowledge): keep a scanning source syncing when one file fails #33223) — justified
  6. The Syncing badge is translated in all 12 locales — undeclared: fourth pick missing from the table

[FIRST-PRINCIPLES-REVIEWED] 44938c9

Description read

[DESCRIPTION-READ] e4f97a4a265acbf5cb882737d9f5a456156ab42d6a8f9324f74a0a3be7236a94

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 44938c9a03e2ca17afa15cb45593f36c7dd22a76 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 44938c9

Verdict parsed from the review's SHA-scoped output markers for commit 44938c9a03e2ca17afa15cb45593f36c7dd22a76.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 44938c9a03e2ca17afa15cb45593f36c7dd22a76 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — 🔴 changes requested (blocking)

GPT 6.1 found at least one blocking issue that must be resolved before merging 44938c9a03e2ca17afa15cb45593f36c7dd22a76. Adjudication upheld 1 of 1 blocking finding(s); those must be resolved before merging.

This comment is updated in place on each push.

BLOCKING -- src/kiro_crew/taskq/reconcile.py:295 -- Fence dispatch when stopped-run settlement fails

report.errors.append(f"{rec.id}: {exc}")
Trigger: A retry_wait subagent has a cancellation tombstone matching its latest claimed attempt; open_default_store → reconcile_on_boot → _cancel_parked_stop encounters SQLite write contention and store.cancel() raises.
Outcome: _queued_pass still succeeds without installing a hold or dispatch fence. After contention clears, the dispatcher claims and reruns the stopped work; its cancellation settlement is never retried.
Anchor: defect
Fix: Propagate settlement failure to the queued pass so dispatch remains fenced while it retries the attempt-, state-, and generation-validated cancellation.

[BLOCK-MERGE] 44938c9
[GPT-REVIEWED] 44938c9

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

MEDIUM–HIGH harm. If the store refuses the write, a subagent the user stopped is run again, silently. Every condition holds in the code. A retry_wait row with a cancelled verdict goes to _cancel_parked_stop (src/kiro_crew/taskq/reconcile.py:247-249). A TaskStoreUnavailable from store.cancel is only logged into report.errors (:295). It installs no hold, and nothing makes _queued_pass return False (:222-230), so reconcile_on_boot skips fence_dispatch (:163-169) and that row's cancel is never retried.
The real fix is cheap, because the mechanism already exists in the same file. The sibling path does the same thing with hold_until_settled (:256-264), and the fence is applied when the pass returns False (:163-169). Neither needs new state. This file is outside the PR's diff, which is a question about scope, not proportionality, so I don't weigh it here.

[ADJUDICATION] 44938c9a03e2ca17afa15cb45593f36c7dd22a76 total=1 uphold=1 downgrade=0
UPHOLD F1 src/kiro_crew/taskq/reconcile.py:295 reason=harm-warrants-remedy
[GPT-ADJUDICATED] 44938c9a03e2ca17afa15cb45593f36c7dd22a76

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 44938c9a03e2ca17afa15cb45593f36c7dd22a76 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 8, 2026
…33223)

A folder scan marks the source 'error' as soon as one file fails, while
the scan is still running. The row then showed the red Error badge and
the "last sync failed" notice mid-scan, and the Sources list and the
Knowledge page stopped polling, so the counts froze. Read an 'error'
row that still reports scanning as syncing, like a 'synced' one, so
polling continues and the failure shows once the scan has ended.

(cherry picked from commit 02b65bc)
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 8, 2026
A source row reads as 'syncing' while its folder scan runs, but the
status label table had no entry for it, so the badge showed the raw
English word "syncing" in every locale. Add the status.syncing label in
all 12 locales.

(cherry picked from commit d924344)
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 8, 2026
@buluoray
buluoray merged commit f3a5fea into release/0.12.0 Nov 8, 2026
28 of 35 checks passed
@buluoray
buluoray deleted the crew/slack/0.12.1-source-sync-notice branch November 8, 2026 19:39
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 8, 2026
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.

2 participants