Skip to content

fix(schedule): list long job results as a preview, read them per job - #32000

Open
bolichen97 wants to merge 1 commit into
mainfrom
fix/24605-cron-list-result-preview
Open

bolichen97 wants to merge 1 commit into
mainfrom
fix/24605-cron-list-result-preview

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The Schedule page loads its job list quickly even with hundreds of jobs whose runs return long results, and the job dialog still shows each job's whole last result and last error.

GET /api/crons redacts and sends every job's full last_result and last_error. With 500 jobs whose runs return about 20 KB each, one list read takes most of a second or more and its body is over 10 MB, even after the list build moved off the gateway's event loop (#24685). The list cannot simply be cut, because the job dialog shows the whole result and error from the list entry.

Why it matters

Anyone with many scheduled jobs that produce long output waits on every Schedule page load and reload, and the gateway spends that time redacting text the page never shows.

Not a goal

  • Cutting message in the list. The job form fills and compares the message field from the list entry, so it stays whole.
  • Making the rest of a list read faster (schedule formatting, next-run times and the other fields cost what they cost today).
  • Making a list read of results that are one long line faster: such a result is still redacted whole, and only the body it sends shrinks.
  • Changing what the run history routes return, or adding a per-job read to the Python client.

What changed (motivation → approach → change)

Redacting every job's whole result on every read was most of a list read's cost, and the page needs only the opening of each one: the row tooltip and the partial-block badge, whose phrase starts the error.

Read last_result / last_error
GET /api/crons (the Schedule list) the first 1,000 characters of the whole text's redaction
GET /api/crons/{id} (new, one job) whole; the row is otherwise the list's

Each result is still redacted whole before it is cut, so the preview masks everything the whole text's redaction masks, however far past the cut the text that decides a match lies. The redaction goes through the dashboard's display redaction cache, the one the chat view already uses (_redact_for_display, the credential pass): it keeps each answer under a keyed digest of the text and of every setting the pass reads, so a list re-read redacts only the results the cache does not hold. That pass opens the chat seam, which the owner's redaction setting stands down, so the list runs it inside always_scan (a row in redaction_seams.py): the two fields stay redacted like every other cron field, whatever the setting. The first read after a gateway start still redacts every result, as main does; every body is about a tenth of main's. The new per-job read uses the same app-ownership gate and audit as the other per-job reads (_refuse_foreign_app_job, crons.get) and answers 404 job_not_found for an unknown job.

Two screens read the whole text through a new api.cron(id) (api/client/cron.ts):

  • The job dialog shows the whole Last Output and Last Error, with the list's preview until it arrives. It shows the whole text only while its last_run_ts is the list row's, so a read that is still pending or has failed after a new run never shows the earlier run's text. If that read fails while the preview is on screen, a notice says the full text could not be loaded, that the text below may be cut short and that the job's settings are not affected. That sentence is one new catalog key, pages.schedulePage.full_run_text_load_failed, in website/src/i18n/locales/en.manual.json and every translated catalog, with en-XA.json regenerated.
  • "Fix with Crew" on a cut cron notification (NotificationDetailPanel.tsx) hands over the job's whole result from the same per-job read, not from the list, which now holds only its opening. If that read fails (a job deleted since, say), a notice under the button says Fix with Crew sends the text shown, which is cut short. The panel is an overlay that may sit over an unsaved draft, so the notice offers no agent hand-off. Its sentence is one new catalog key, components.notifications.notificationDetailPanel.could_not_load_the_whole_result_button_sends_the_cut_text, in website/src/i18n/locales/en.json and every translated catalog, with en-XA.json regenerated.

The dialog's Last Output and Last Error, with their per-job read and its notice, are one component, JobRunText in SchedulePageJobRunText.tsx, which keeps SchedulePage.tsx under the 2,000-line cap. The list carries no length fields: both screens read the job, so nothing else needs to know where the cut fell. The owning specs (learn-cron-dashboard.md, app-notifications.md, and security.md's list of always_scan sites), the feature map, the App Kit route table, the shared cronJobsQuery note and the CronJob type (types/index.jobs.ts) say the list carries a preview.

Backwards compatibility

Breaking: GET /api/crons returns at most the first 1,000 characters of each job's last_result and last_error; a reader that needs the whole text reads GET /api/crons/{job_id}. Writer sweep on origin/main @ 7a3cec9: nothing writes these fields through the route; the readers are listed below.

Reader: website/src/pages/SchedulePageJobRunText.tsx:JobRunText -- crew page -- reads api.cron(id) for the whole text; SchedulePage.test.tsx "the detail dialog shows the whole last output, read for the job, not the list preview"
Reader: website/src/components/notifications/NotificationDetailPanel.tsx:fixWithCrew -- notifications -- reads api.cron(job_id) for a cut note's whole result; NotificationDetailPanel.fixWithCrew.test.tsx "stages the job's whole last result for a cron note whose body the store cut"
Reader: website/src/pages/SchedulePage.tsx:status cell title -- crew page -- a tooltip, the opening is what it can show
Reader: website/src/utils/cronPartlyBlocked.ts:isPartlyBlocked -- crew page -- its pattern is anchored at the start of last_error, which the preview keeps
Reader: docs/app-kit/api-reference.md:listCrons -- app -- an app gets the preview from the list and reads one job whole from GET /api/crons/{job_id}, both stated in the reference
Reader: packages/kirocrew-client-py/kirocrew_client/client.py:list_crons -- app -- returns the list as served, so a caller gets the preview; no caller in the repository reads these two fields from it
Reader: src/kiro_crew/mcp_cron_list_render.py:_render_cron_list_full -- chat -- reads the cron store, not this route

Tests

  • test/test_cron_list_build_off_loop.py::TestResultPreview: with the owner's redaction setting off (the shipped default), the list carries the first 1,000 characters of the whole text's redaction, so a credential the cut lands in shows as the redaction tag, and GET /api/crons/{id} masks it in the whole result (red without always_scan); a second list read redacts no unchanged result again, with the setting off too; GET /api/crons/{id} returns the whole redacted result, and 404 job_not_found for an unknown id. The owner view still reaches the worker (main's test_owner_view_scope_reaches_the_worker).
  • test/test_r16_cron_app_read_ownership.py: the new route joins the per-job read table, so an app is refused a job it does not own (403, audited denied), reads its own (audited allowed), and the owner reads every job.
  • test/test_dashboard_cron_path_id.py: an empty or over-long job id is a 400 before the store is read.
  • website/src/test/SchedulePage.test.tsx: the dialog shows the whole last output from the per-job read, not the list's preview; a failed per-job read shows the notice and keeps the preview, and the next cron refresh reads the job again, shows the whole text and drops the notice; after a new run, a failed re-read shows that run's output, not the earlier run's error kept in the cache (red without the last_run_ts check).
  • website/src/test/NotificationDetailPanel.fixWithCrew.test.tsx: a cut cron note's hand-off carries the whole result served by api.cron, not the list; when that read fails, the notice says the text it sends is cut short and the click still sends the note as stored (red without the notice).
  • test/test_redaction_one_setting.py reads the ALWAYS_REDACTED_SITES row against the always_scan call.
  • test/test_cron_handler_facade.py, test/test_member_memory_api.py, the MCP route-table rows (test/fixtures/dashboard_mcp_route_table.txt) and ApiClient.refactor.surface.test.ts list the new route and client method.
  • Determinism: test/test_cron_list_build_off_loop.py ran green 20 times at -n0 and in three shuffled orders of its tests (seeds 24605, 7, 1234); NotificationDetailPanel.fixWithCrew.test.tsx and SchedulePage.test.tsx ran green 10 times in a row and once in shuffled order (--sequence.shuffle, seed 1794856978513).

Proof: not provable -- other: the new tests import api_cron_get and _LIST_TEXT_PREVIEW, so reverting the whole change stops them at collection rather than at an assertion

Manual verification

Timed the real api_crons handler on a Linux host (Ubuntu 24.04, 8 vCPU, load average about 2.5 to 3, main at 899d458), 500 jobs whose results are about 20 KB of multi-line text: the first read, then the median of the next five reads in the same process, with the owner's redaction setting off (the shipped default) and on.

Results setting main: first / re-read this change: first / re-read body
no credential in them off 1.26 s / 1.22 s 1.38 s / 0.16 s 10.50 MB → 1.11 MB
no credential in them on 1.21 s / 1.21 s 1.17 s / 0.16 s 10.50 MB → 1.11 MB
a token on every first line off 1.36 s / 1.25 s 1.20 s / 1.22 s 10.52 MB → 1.11 MB
a token on every first line on 1.24 s / 1.24 s 1.20 s / 1.22 s 10.52 MB → 1.11 MB

A result the redaction changes costs the cache about twice its length, so 500 such results overflow its 16 MiB bound and are redacted again on every read, and each such read also pushes the chat view's cached redactions out of the cache they share, which main's list never wrote to; at 300 of them a re-read took 0.10 s. On this change, in both positions of the setting, the token is in neither the list nor the per-job read, every listed result is at most 1,000 characters and equals the start of the redacted whole text, GET /api/crons/{job_id} returns the whole redacted text, an unknown id answers 404 job_not_found, and a short result is listed whole.

Against the SPA built from this change with every API answered from fixtures, a job whose 60-line result the list cut at 1,000 characters: when the per-job read answered, the dialog showed the output to its last line; when it answered 404, the dialog showed the notice above the preview, with no server text and no button. A cut cron notification for that job: when the per-job read answered, the panel showed no notice; when it answered 404, the notice under Fix with Crew said the text it sends is cut short.

Screenshots / video

The job dialog shows the whole last output, read for the job (scrolled to its end, well past the list's 1,000-character preview):

Job dialog, whole last output

When the per-job read fails, the dialog says what failed and what is shown instead, and keeps the list's preview:

Job dialog, per-job read failed

A cut cron notification whose job's whole result could not be read (404): the notice under Fix with Crew says the text it sends is cut short (dark, then light):

Notification, whole-result read failed, dark

Notification, whole-result read failed, light

The same notification when the read answers: no notice, and Fix with Crew sends the whole result:

Notification, whole-result read answered

Related Issues

Closes #24605

Sibling sweep

Swept: git grep -nE "last_result|last_error|"summary"|"trace"" -- src/kiro_crew/dashboard/handlers/
Sibling: src/kiro_crew/dashboard/handlers/cron_runs.py:366 -- not affected -- history reads are paged (at most 200 runs) and the store keeps a 200-character summary

Pattern harvest

Rule candidate: a preview of text the dashboard redacts is cut from the whole text's redaction (_redact_for_display, which caches it), never redacted from a cut, because the redaction decides some matches from text past any cut.

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

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 7, 2026 02:22
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 1b27c6f96a6a622ff3ce8b0edcf6f7b3bedbac45 — 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. Each item follows from the measured list cost of more than 10 MB per read, and the new per-job route has two real consumers.

What this change ships

Inventory (8 items) — 8 justified

Intent: let people with many long-output scheduled jobs load the Schedule page quickly while still seeing each job's whole last result and error. This is a FIX.

  1. The Schedule list now sends only the first 1,000 characters of each job's last result and last error — justified
  2. A new read, GET /api/crons/{id}, returns one job with its whole result and error, behind the app-ownership gate and audit — justified
  3. The job dialog shows the preview first, then the whole Last Output and Last Error once the per-job read arrives — justified
  4. The dialog shows a notice when the whole text fails to load — justified
  5. "Fix with Crew" on a cut cron notification now hands over the whole result from the per-job read — justified
  6. "Fix with Crew" shows a notice when that read fails — justified
  7. The list's result redaction now goes through the existing display redaction cache, so a re-read redacts only the results it has not seen — justified
  8. A new always_scan row in redaction_seams.py keeps these two fields redacted whatever the owner's redaction setting — justified

[FIRST-PRINCIPLES-REVIEWED] 1b27c6f

Description read

[DESCRIPTION-READ] 3df6aa18fa0b1cce67a6b070774cb250b7e44b2ccc10495e599e83069b5e7819

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 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

No design-level blocker: the list sends a preview, a new per-job read returns the whole text, and the take-away readers are listed.

Notes

  • _result_text now runs only _redact_for_display, which is the credential pass alone (display_battery → redact_credentials). The old _r also ran redact_exfiltration_urls. Cause: the switch to the cache. Mechanism: an exfiltration URL in a run's last_result or last_error is no longer masked. Consequence: the list and GET /api/crons/{id} now send it unmasked, which contradicts the claim that "the two fields stay redacted like every other cron field". Either run redact_exfiltration_urls before the cached credential pass, or state the narrowing under Backwards compatibility.

[DESIGN-REVIEWED] 1b27c6f

Description read

[DESCRIPTION-READ] 4685753a0d0cf2f0014f1b730ab56504b6b673fa7c1aab6aa0e08193a290dd40

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 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks. The blind reader read both new notices correctly, and screenshots show each one with and without its failure state.

Notes

  • pages.schedulePage.full_run_text_load_failed says "the text below may be cut short". The list caps previews at 1,000 characters, so the dialog can tell whether this preview is actually cut. Show the notice only when last_result/last_error reaches that length, and say "is cut short". The reader said the dangling "s" in shot-02 "looks broken" even with the warning.
  • Neither notice gives a way to try again. The reader said: "I don't know how to get the full text." The dialog retries on the next refresh, so say so: "…cut short. It loads again on the next refresh."
  • Shot-05 shows a successful read, but the notification body still ends in "…nigh…" with no notice. The reader "can't tell whether this cut-off is normal or a problem". The cut here comes from the notification body itself, not from this change. A follow-up could label it as a preview.

[UX-REVIEWED] 1b27c6f

Description read

[DESCRIPTION-READ] a25d116b056369a3f1bdb4828d02b2c7002544e101153fb9639bd158f48a8e2f

That sha256 names everything this verdict read: the PR description, plus the 8 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 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 1b27c6f96a6a622ff3ce8b0edcf6f7b3bedbac45 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 1b27c6f

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

@bolichen97
bolichen97 enabled auto-merge (squash) November 7, 2026 02:44
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 1b27c6f96a6a622ff3ce8b0edcf6f7b3bedbac45 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 1b27c6f

Verdict parsed from the review's SHA-scoped output markers for commit 1b27c6f96a6a622ff3ce8b0edcf6f7b3bedbac45.

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

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/24605-cron-list-result-preview branch from 5f88d4f to 51a95fe Compare November 7, 2026 04:18
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, docs/system-specs/modules/learn-cron-dashboard.md, src/kiro_crew/dashboard/handlers/init.py, src/kiro_crew/dashboard/server_runtime/mcp_routes.py, test/test_dashboard_server_composition_contract_reach.py and website/src/test/ApiClient.refactor.surface.test.ts since this head went green (a47c2d4 -> 2552c90); CI re-running.

The route-table digest conflict is resolved by recomputing it on the rebased table (339 rows). The same push fixes this head's reds: the cron facade's type-checking manifest now names _LIST_TEXT_PREVIEW and _jobs_response, the test fixtures that tripped the content scan are assembled from fragments, and the job dialog keeps an earlier run's cached text off screen (disposition below).

[operator: bolichen97]

@bolichen97

bolichen97 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=8eacc61ffa7a Failed detail refresh shows an earlier run's error instead of current output

fixed in 51a95fe: the dialog uses the per-job row only while its last_run_ts equals the list row's, otherwise the list entry; a pending or failed re-read after a new run now shows that run's preview, never the earlier run's cached text.
Pinned by SchedulePage.test.tsx "a failed re-read after a new run shows that run's output, not the earlier run kept in the cache" (red without the check).

[operator: bolichen97]

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/24605-cron-list-result-preview branch from 51a95fe to 76dde3e Compare November 7, 2026 07:55
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/app-kit/api-reference.md, docs/feature-map/README.md, docs/system-specs/modules/learn-cron-dashboard.md, src/kiro_crew/dashboard/handlers/init.py, src/kiro_crew/dashboard/handlers/cron.py, src/kiro_crew/dashboard/handlers/cron_board.py, src/kiro_crew/dashboard/server_runtime/mcp_routes.py and test/test_dashboard_server_composition_contract_reach.py since this head went green (2552c90 -> 5f7f8d1); CI re-running.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • span=5892b647d1db The failed-read notice doesn't say what failed or what is being shown instead

fixed in 76dde3e: while the list's preview stands in for the whole text, the notice's title says the full text of the last run could not be loaded, that the text below may be cut short and that the job's settings are not affected; the server's message sits under it as detail, and a Retry in the notice reads the job again.
The notice hides once the whole text of the current run is on screen; Save is unaffected because the form reads the list row, which keeps message and every setting whole.
No trailing ellipsis: the client cannot tell a cut preview from a short whole text, so the title's "may be cut short" carries that.
Pinned by SchedulePage.test.tsx "a failed read of the whole text says so and keeps the preview" (title, message, Retry re-read; red without the fix).

[operator: bolichen97]

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 7, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Backend Tests shard 2 (Linux and Windows) fail on test/test_security_gate_liveness.py::test_the_package_stays_within_its_line_budget, and it fails on main too: the security package is 34855 lines against a budget of 34845, and this PR does not touch that package. #32183 raises the budget. This PR waits for it and then rebases onto it. The other red lanes on this head (AI reviews, PR Policy, Sensitive Change Review, Dependency License Gate, readiness) failed reading the GitHub API under the shared token's rate limit, not on a finding; they re-run with the rebase.

@bolichen97
bolichen97 force-pushed the fix/24605-cron-list-result-preview branch from 76dde3e to 7c02453 Compare November 7, 2026 13:46
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, docs/system-specs/modules/learn-cron-dashboard.md, website/src/pages/SchedulePage.tsx, website/src/i18n/locales/en.manual.json, website/src/i18n/locales/en-XA.json and the bn, de, es, fr, hi, it, ja, ko, pt, ru and zh-CN catalogs in website/src/i18n/locales/ since this head went green (5f7f8d1 -> f58c3cf); CI re-running.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/24605-cron-list-result-preview branch from fd43faf to d55789b Compare November 12, 2026 09:36
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, docs/system-specs/modules/app-notifications.md, docs/system-specs/modules/learn-cron-dashboard.md, website/src/test/ApiClient.refactor.surface.test.ts and the i18n catalogs in website/src/i18n/locales since this head went green (3703c2e -> 80cf3df); CI re-running.

The new base carries the fixes for the two main reds that held fd43faf: #35541 (the test_mcp_remote_transport TestRewriter cases) and #35725 (the Coverage Gate per-file floor, #35713). The rebase was clean and the patch is unchanged. @buluoray this push dismissed your approval of fd43faf; the change since is the rebase only.

[operator: bolichen97]

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

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Correction to the note above: this push did not dismiss buluoray's approval. GitHub carried it to d55789b, since the rebase left the patch unchanged, so the PR still holds that approval.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 12, 2026
@bolichen97
bolichen97 force-pushed the fix/24605-cron-list-result-preview branch from d55789b to beb4ddf Compare November 13, 2026 14:29
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/app-kit/api-reference.md, docs/feature-map/README.md, docs/system-specs/modules/app-notifications.md, docs/system-specs/modules/learn-cron-dashboard.md, src/kiro_crew/dashboard/handlers/init.py, src/kiro_crew/dashboard/server_runtime/mcp_routes.py, test/test_dashboard_server_composition_contract_reach.py, website/src/api/client/cron.ts, website/src/components/notifications/NotificationDetailPanel.tsx, website/src/pages/SchedulePage.tsx, website/src/test/ApiClient.refactor.surface.test.ts and the i18n catalogs in website/src/i18n/locales since this head went green (80cf3df -> a45e97a); CI re-running.

GitHub reported this PR as conflicting. The three conflicts each kept both sides: the Schedule row in docs/feature-map/README.md now names main's ScheduleCrewmateRosterNotice.tsx and this change's SchedulePageJobRunText.tsx; SchedulePage.tsx keeps both adjacent imports; and the MCP route-table pin in test_dashboard_server_composition_contract_reach.py was re-measured on the rebased tree at 354 rows (main's 352 plus this change's GET and HEAD for /api/crons/{job_id}). The rest of the patch is unchanged.

@buluoray this push dismissed your approval of d55789b; the change since is this rebase only.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 13, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 13, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Re-sync budget reset

This head's three re-syncs are spent, and its Backend Tests shard 3 (Linux and Windows) are red only on test/test_mate_conductor_parity.py::test_every_shared_rule_has_an_ultra_counterpart_or_a_named_gap, which main broke and has since fixed in #36652. Inside the PR's 48-hour watch a maintainer asked for another round of re-syncs so it can be rebased onto that fix and kept green.

[operator: bolichen97]

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 14, 2026
GET /api/crons redacted and sent every job's whole last_result and
last_error on every read, so one Schedule page load at 500 jobs with
20 KB results took seconds. The list now carries the first 1,000
characters of each whole-text redaction, which goes through the
dashboard's display redaction cache, so a re-read redacts only the
results that changed. Both fields stay redacted like every other cron
field whatever the owner's redaction setting. GET /api/crons/{id}
returns one job's row with both whole under the same app-ownership
gate and audit as the other per-job reads. The job dialog and the
notification panel's "Fix with Crew" read it for the whole result and
error.

Closes #24605
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/app-kit/api-reference.md, docs/feature-map/README.md, docs/system-specs/modules/app-notifications.md, docs/system-specs/modules/learn-cron-dashboard.md, docs/system-specs/modules/security.md, src/kiro_crew/dashboard/handlers/init.py, src/kiro_crew/dashboard/handlers/cron.py, src/kiro_crew/dashboard/handlers/cron_board.py, src/kiro_crew/dashboard/server_runtime/mcp_routes.py, src/kiro_crew/redaction_seams.py, test/fixtures/dashboard_mcp_route_table.txt, test/test_cron_list_build_off_loop.py, test/test_member_memory_api.py, website/src/components/notifications/NotificationDetailPanel.tsx, website/src/pages/SchedulePage.tsx, website/src/test/ApiClient.refactor.surface.test.ts and the i18n catalogs in website/src/i18n/locales since this head went green (a45e97a -> 7a3cec9); CI re-running.

GitHub reported the branch as conflicting with main in docs/system-specs/modules/learn-cron-dashboard.md, test/test_cron_list_build_off_loop.py and test/test_dashboard_server_composition_contract_reach.py. Main's #37681 moved that test's route table into test/fixtures/dashboard_mcp_route_table.txt, so the rebase adds the two HEAD and GET /api/crons/{job_id} api_cron_get rows there; the two other files keep main's text plus this PR's lines.

Main's #37408 (one redaction switch) changed what this PR builds on, so this push also makes two adjustments:

  • _redact_for_display now opens the chat seam, which stands down when the owner's redaction setting is off, and that setting now ships off. Rebased as is, the list and the per-job read would have shown the owner job results unredacted while every other cron field stays redacted. _result_text now runs that pass inside redaction_switch.always_scan() unless the caller opened a scope that stands the credential pass down (the owner view, which main's test_owner_view_scope_reaches_the_worker pins), with the row test_redaction_one_setting.py requires in redaction_seams.ALWAYS_REDACTED_SITES. So the two fields are redacted exactly as _r redacts the rest of the row, and the display cache is still read and filled under the default. The straddling-token test and the cache test now run with the setting off, and the token test also checks GET /api/crons/{id}. Both are red without always_scan.
  • test_cron_list_build_off_loop.py imported structured_engine, which feat(security): one redaction switch, rule table only, value-only masks #37408 deleted, so it no longer collected. Its near-the-cut corpus and the encoded-credential and PEM tests are removed. The corpus pinned the opening-only redaction this PR no longer has, and four of its seven cases are not masked by main's value-only rules even in the whole text. The two other tests pinned the same whole-then-cut invariant the straddling-token test pins.

The patch was gated again on main at f6a144e on Ubuntu 24.04. These all pass:

  • black, isort, flake8, mypy, docs lint, semgrep and the flake ratchet;
  • the i18n checks, the type check and the vitest set for the Schedule page, the API client surface and every notification panel test (1,570 tests);
  • the backend set for the cron routes, the route tables, the owner and app gates and the redaction setting (5,032 passed, none failed);
  • test_cron_list_build_off_loop.py and test_dashboard_server_composition_contract_reach.py, 10 runs each at -n0.

With 300 jobs whose results are about 20 KB each and carry a token on their first line, and the owner's redaction setting off and then on, every listed result was at most 1,000 characters and the start of the per-job read's text, the token was in neither body, an unknown id answered 404 job_not_found, and a short result was listed whole. The first list read took about 0.75 s and each later read about 0.09 s.

Main has since moved to 7a3cec9. It changed none of this PR's code or test files, none of the redaction modules the list goes through, and no code that reads a cron job's last_result or last_error or calls the cron routes, so the patch re-applied unchanged (git range-diff shows it equal); the locale catalogs parse with no duplicate keys, and docs lint and the feature-map check pass on the new base.

The reds on the previous head do not carry over: Backend Tests shard 3 (Linux and Windows) failed only test_mate_conductor_parity.py, which main has fixed since, and shard 7 lost an xdist worker in test_transcribe.py, which this PR does not touch.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

resolution: removed -- the list preview redacted only the opening of each result, and the redaction decides some matches from text past the cut, so the list now redacts each whole result through the display redaction cache and cuts that; the tests that pinned the removed opening-only redaction (the near-the-cut corpus, which no longer imports on main, and the encoded and PEM duplicates of the cut invariant) are gone

Kept as is: the GPT lane passes on this head with no findings; the next head is this commit rebased onto main to clear the conflict GitHub reports, with the list preview cut from each result's whole redaction.
The pushes counted before this one followed heads blocked by spans 8eacc61ffa7a, 5892b647d1db and 6658273a39b9, each fixed or narrowed and passing on every lane now, or by main's own reds.

[operator: bolichen97]

@bolichen97
bolichen97 force-pushed the fix/24605-cron-list-result-preview branch from beb4ddf to 1b27c6f Compare November 17, 2026 22:40
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schedule page: send a capped result preview in the job list and read full text per job

3 participants