Skip to content

Follow-up: complete Slack attachment contract parity + hardening after PR #601 #604

Description

@Aaronontheweb

Context

PR #601 fixed the primary live-ingress bug (non-image Slack attachments being silently dropped), but we intentionally deferred several follow-ups that are still worth landing to close correctness and hardening gaps.

Why this issue

Live Slack ingress is now attachment-aware, but historical thread hydration and a few robustness items remain inconsistent with the intended contract.

Follow-up tasks

  • Backfill parity (completeness): update src/Netclaw.Channels.Slack/SlackThreadHistoryFetcher.cs so historical thread hydration no longer hard-filters to image/* only.
    • Current filter is around SlackThreadHistoryFetcher.cs:146.
    • Ensure historical PDFs/docs are handled consistently with live ingress behavior.
  • User-facing error hygiene: in src/Netclaw.Channels.Slack/SlackThreadBindingActor.cs, avoid exposing raw ex.Message in channel replies on download/scan/write failures.
    • Keep exception details in logs; return stable user-safe messages in Slack.
  • Attachment-line safety: harden [attachment] line construction to normalize control characters/newlines in metadata before emitting text.
    • Current escaping (EscapeQuoted) handles quotes/backslashes only.
  • Regression tests: add tests for
    • historical non-image backfill behavior,
    • control-char/newline sanitization for attachment metadata,
    • sanitized user-facing failure text.
  • Ops skill sync: update feeds/skills/.system/files/netclaw-operations/SKILL.md guidance to match inbox + attachment-line behavior.

Acceptance criteria

  • Historical backfill no longer silently omits non-image attachments.
  • No raw exception internals are sent to Slack users from attachment ingest failures.
  • Attachment announcement lines remain single-line and parse-safe even with hostile filename metadata.
  • New tests cover the above cases and pass in CI.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions