Skip to content

fix(telegram): harden durable topic archive authority - #3828

Merged
Yeachan-Heo merged 3 commits into
Yeachan-Heo:devfrom
twoimo:feat/telegram-topic-authority-v13
Aug 5, 2026
Merged

fix(telegram): harden durable topic archive authority#3828
Yeachan-Heo merged 3 commits into
Yeachan-Heo:devfrom
twoimo:feat/telegram-topic-authority-v13

Conversation

@twoimo

@twoimo twoimo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary\n\nSuccessor to closed PR #3700, based on current dev and materially updated for the repository owner's exact-head finding.\n\n- preserves the reviewed shared durable Telegram topic authority, CAS convergence, retry recovery, and exact Windows replacement work;\n- requires ok === false, error_code === 400, and an exact allowlisted Telegram description before treating an archive error as idempotently settled;\n- proves identical TOPIC_NOT_FOUND text under 401, 403, 429, and 500 remains archive_pending with a durable retry job;\n- advances the daemon generation to 51 and refreshes the semantic manifest;\n- retains the current-dev SDK operation inventory closure required by #3813.\n\n## Verification\n\n- bun --cwd=packages/coding-agent run check\n- bun scripts/telegram-daemon-generation-guard.ts --validate-current-tree\n- 700 tests pass across the daemon, topic registry, settle fence, CAS, #2960, red-team, SDK inventory, and generation-guard suites\n- focused archive settlement matrix: valid 400 settles; 401/403/429/500 remain retryable\n\n## Prior blocker disposition\n\nAddresses the terminal findings in #3700 comments 5186020314 and 5186230104 exactly. No allowlisted description can settle durable archive authority unless Telegram reports documented error code 400.

@twoimo

twoimo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@Yeachan-Heo successor PR is ready for exact-head review at e7985639a: current with dev, merge state CLEAN, and all required checks green. The #3700 terminal blocker is covered by strict error_code === 400 settlement plus durable-retry regressions for 401/403/429/500.

@twoimo
twoimo force-pushed the feat/telegram-topic-authority-v13 branch from e798563 to 3fdb2c9 Compare August 5, 2026 05:53
@twoimo

twoimo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed exact head 3fdb2c9f7: rebased onto current dev at 5938de578, dropping the now-upstreamed SDK inventory closure commit. Revalidation on the current base: generation-manifest validation pass, coding-agent check/types pass, and 700 affected daemon/topic/CAS/red-team/inventory/generation tests pass. Requesting exact-head review once CI settles.

@twoimo
twoimo force-pushed the feat/telegram-topic-authority-v13 branch from 7f34590 to caa929f Compare August 5, 2026 07:11
@twoimo

twoimo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Exact head caa929f72 repairs the sole auto-update CI failure. The four real-WebSocket /btw E2E cases were still injecting bare fs.promises, which lacks the durable identity/fsync contract required by the topic authority writer; they now use the production filesystem adapter. The strict-dispatch test also waits for the identity header instead of a timing-only 80 ms delay. Local /btw E2E: 4/4 pass; coding-agent check/types and generation validation pass. The tree preserves the auto-update generation-51 resolution exactly.

@twoimo
twoimo force-pushed the feat/telegram-topic-authority-v13 branch from caa929f to 4a44126 Compare August 5, 2026 07:15
@twoimo

twoimo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Exact head 4a4412650 now contains immutable CI event base 0825a4208. The intervening base change is Slack-only; generation validation, coding-agent check/types, and 91 focused archive-generation + real-WebSocket /btw tests pass on this exact head.

@twoimo
twoimo force-pushed the feat/telegram-topic-authority-v13 branch from 4a44126 to dd87e8a Compare August 5, 2026 07:36
@twoimo

twoimo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Exact head dd87e8a2b is rebased onto current dev 4c07aa4a4; the two intervening commits are TUI-only. Focused archive-generation and real-WebSocket /btw matrix remains 91/91 green; generation validation passes.

@Yeachan-Heo
Yeachan-Heo merged commit 993bc55 into Yeachan-Heo:dev Aug 5, 2026
7 checks passed
@Yeachan-Heo

Copy link
Copy Markdown
Owner

Triage verdict: MERGED via squash (993bc555) at 2026-08-05 07:37 UTC.

Reviewed the full diff against dev (head 4a4412650, base 0825a4208): 40/40 affected checks completed with zero failures at merge time.

The prior #3700 blocker is addressed exactly: topicArchiveSettled now settles an archive error only when ok === false and error_code === 400 and the description matches the anchored allowlist; identical TOPIC_NOT_FOUND text under 401/403/429/500 stays archive_pending with a durable bounded retry job (covered by the startup-scan reconciliation matrix in notifications-telegram-daemon.test.ts). Archive now closes daemon-created topics without deleting retained records, user-created topics are never closed remotely, the topic registry writes are crash-atomic (file+directory fsync, native Windows exact write-through replacement), versionless legacy snapshots are quarantined rather than interpreted as empty, shared-volume access is fenced by host-qualified locks and CAS generation, and validation mode persists nothing. Generation 51 / serving epoch 5 ownership compatibility is fail-closed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants