Skip to content

The attention view reports zero actions when every record was suppressed #164

Description

@justin808

Problem

The attention view cannot tell "nothing needs you" apart from "everything was thrown away".

buildAttentionModel drops records for several ordinary reasons and records each one as a diagnostic: unknown_host when a record names a host that is neither M5 nor M1, and the freshness suppressions stale_source, stale_companion, and clock_skew. The reader drops records earlier for unreadable, invalid_json, schema_invalid, repository_mismatch, workspace_mismatch, and id_mismatch. In all of those cases the source still reports status: ok with partial: false and truncated: false, because the read succeeded — it was the records that did not survive.

PR #150 drives its incompleteness signal off the source flags (partial or truncated) plus the payload-level diagnostics_truncated kind. That is deliberate: the earlier rule fired on any diagnostic at all, which made a permanently-on banner, and a client-side list of "which kinds mean data loss" is a copy of the model's vocabulary that will drift the first time a kind is added.

The consequence of the correct rule is this gap: when every card is suppressed, the view renders 0 actions need Justin and the decided empty state, with no indication that six records were read and discarded. The failure is quiet and it asserts something false.

It is worst in combination with #160. On any machine whose records name a host other than M5 or M1, every card is suppressed, so the view is not merely inert — it actively reports that there is nothing to do.

Proposed fix

Put the signal on the server, where the vocabulary lives, rather than in a client-side kind list.

Give each source entry a count of records that were read but did not become cards — for example suppressed_count, alongside the existing partial and truncated. The model already knows this number: it emits one diagnostic per suppression. Then the client's existing rule covers it with no new vocabulary: a source with suppressed_count > 0 is a source whose data is incomplete, and the notice can say how many records were suppressed rather than how many diagnostics exist.

Two details worth deciding together:

  • Whether suppressed_count should distinguish reader-level drops (malformed or foreign records) from model-level suppressions (unknown host, stale). One number is simpler and probably enough for a banner; two numbers let the view say something more useful about which is which.
  • Whether a suppressed-only payload should show the empty state at all. "0 actions need Justin, 6 records suppressed" is honest; "0 actions need Justin" alone is not.

The client change is small once the field exists, and it is additive to the payload, so it does not break the existing guard.

Evidence

The server-side-signal approach was suggested by the lane worker while implementing that correction, and it is the right shape: the client should not learn the model's vocabulary.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions