Skip to content

Bug: archived channels remain addressable and recreation is undefined #325

Closed

Description

@tre1d

Summary

PATCH /api/channels/<id> with archived: true does not stop delivery: the channel remains addressable and messages still post. A recreated channel gets a new id; the old id returns 400. There is no unarchive or recreate endpoint.

Impact

A retired room can still receive traffic; after a purge and recreate, every stored id is stale. A future mention may wake nothing if the client filters archived channels, and old links fail.

Expected

  • Archived channels reject new messages, or return a clear error.
  • Document the archive semantics and id rotation.
  • Add an unarchive or explicit recreate endpoint, or make the behaviour explicit.

Steps to reproduce

  1. Archive a channel.
  2. Post to it: the message is accepted.
  3. Delete and recreate the room: the new id differs; the old id answers 400.

Activity

  1. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    P2Normal priority bug or improvement with limited blast radius.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Nov 9, 2026
  2. clawsweeper commented on Nov 9, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep open: current main still permits archived-channel posting, and the author's open fixing PR must be resolved before this issue can close.

    Reproducibility: Current source proves that authorized members can post after archival in both stores; no live reproduction ran, and the claimed absence of unarchive support is contradicted by source and tests.

    Maintainer decision needed

    • Question: Should archiving make a channel read-only across messages, replies, topics, slash commands, and ephemeral events?
    • Recommendation: Define read-only archives: Specify blocked operations and archive-transition behavior, then complete fix(api): reject posts to archived channels #326 with regression coverage.
    • Why: The existing contract defines organization, retained access, and restoration; the author's proposal adds write restrictions without a recorded owner decision.

    Next step
    Resolve the archive contract in #326 and use the existing Restore channel action for identity-preserving recovery.

    Review details

    Best possible solution:

    Define archive write semantics and complete the existing PR within that contract while preserving history, links, and restoration.

    Do we have a high-confidence way to reproduce the issue?

    Current source proves that authorized members can post after archival in both stores; no live reproduction ran, and the claimed absence of unarchive support is contradicted by source and tests.

    Is this the best way to solve the issue?

    The shared posting guard is a focused implementation point after an archive contract is agreed, but restoration already solves recovery without recreation or ID rotation.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No recorded owner decision establishes which write operations archive should reject.
    • The purge-and-recreate report lacks an exact supported workflow or environment; the existing restore path preserves identity.

    Codex review notes: model internal, reasoning medium; reviewed against 03e85d6c704a.

    Label changes

    Label changes:

    No label changes.

    Label justifications:

    • P2: Archive lifecycle expectations affect a limited workflow without evidence of an urgent regression.
    • impact:ux-friction: Unclear archive write semantics cause confusion, while identity-preserving recovery already exists in the product.
    Evidence reviewed

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed November 11, 2026, 6:19 AM ET / 11:19 UTC.

  3. tre1d commented on Nov 9, 2026

    @tre1d
    ContributorAuthor

    Code check: CreateMessage calls requireCanPostTx, which checks workspace role, moderation, guest access, and the guest post budget, but never reads archived_at. The sqlite store has the same shape. A guard in requireCanPostTx (or CreateMessage) that rejects posts to archived channels, with tests in both stores, is a small fix. The recreate/unarchive endpoint is a separate feature.

  4. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Nov 9, 2026
  5. steipete commented on Nov 14, 2026

    @steipete
    Contributor

    Fixed by #326. The regression reproduced a new post to an archived channel returning HTTP 201; it now returns HTTP 409. Both stores also reject new thread replies, and the tests verify that PATCH with archived:false restores posting while retaining the same channel ID. Existing history remains readable, and the archive/restore semantics are documented.

    The full project gate, focused store/HTTP regressions, and exact-head CI (including PostgreSQL, browser, Docker, desktop, and CodeQL checks) passed: https://github.com/openclaw/clickclack/actions/runs/43571876167.

  6. added a commit that references this issue on Nov 14, 2026
    16bb9fd
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

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions