Skip to content

fix(gateway): log skipped missing kanban artifacts - #40841

Closed
Dusk1e wants to merge 1 commit into
NousResearch:mainfrom
Dusk1e:fix/log-skipped-missing-kanban-artifacts
Closed

fix(gateway): log skipped missing kanban artifacts#40841
Dusk1e wants to merge 1 commit into
NousResearch:mainfrom
Dusk1e:fix/log-skipped-missing-kanban-artifacts

Conversation

@Dusk1e

@Dusk1e Dusk1e commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

What & why

_deliver_kanban_artifacts._add() dropped any artifact path missing on
disk via if not os.path.isfile(...): return with no log line. When a
kanban worker reports a deliverable in event_payload['artifacts'] but
never actually writes the file, the upload is silently skipped and
gateway.log shows nothing — there is no way to learn why the promised
file never arrived.

Commit 947e21b (#39767) already fixed exactly this for
extract_local_files. The summary and task.result sources route
through that function, but the explicit artifacts list is fed straight
into _add() and bypasses it — leaving this as the one remaining silent
drop, on the most reliable artifact source.

Fix

Add a matching INFO log at the drop point (path sanitized via
_log_safe_path, same as the source commit). Behavior is unchanged —
observability only, low risk. The now-inaccurate docstring is updated.

Tests

Extended the existing regression test
test_notifier_artifact_delivery_skips_missing_files to assert the
missing artifact is logged exactly once and the real file is still
delivered (and not logged as missing).

tests/hermes_cli/test_kanban_notify.py ............  12 passed
tests/gateway/test_extract_local_files.py ..........  48 passed
============================ 60 passed ============================

Confirmed the new assertion catches the regression: with the log line
removed the test fails (0 matching records); restored → passes.

Explicit kanban artifacts (event_payload['artifacts']) are fed straight into _deliver_kanban_artifacts._add(), which dropped any path missing on disk via 'if not os.path.isfile(...): return' with no log line. When a worker reports a deliverable it never wrote, the file silently never arrives and gateway.log shows nothing.

extract_local_files() already logs this case (commit 947e21b), but the summary/result sources route through it while the explicit artifacts list bypasses it -- so this was the one remaining silent drop. Add a matching INFO log (path sanitized via _log_safe_path) so the gap is visible. Behavior is unchanged; only observability.

Updated the existing regression test to assert the drop is logged.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery labels Jun 6, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Superseded by consolidated artifact fix #63619, which preserves scratch deliverables as durable task attachments, validates declared files, records attachment rows, keeps missing claims in flight, and supports strict gateway delivery. Thank you for the artifact-lifecycle work; the final implementation consolidated this cluster onto the existing attachment system.

@teknium1 teknium1 closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants