Skip to content

build: make pre-seed a default feature#1197

Merged
thepagent merged 1 commit into
mainfrom
fix/enable-pre-seed-unified
Jun 25, 2026
Merged

build: make pre-seed a default feature#1197
thepagent merged 1 commit into
mainfrom
fix/enable-pre-seed-unified

Conversation

@chaodu-agent

@chaodu-agent chaodu-agent commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Makes pre-seed a default feature instead of opt-in. Its deps (aws-sdk-s3, flate2, tar) are already compiled for other default features (config-s3, secrets-aws). No reason to gate a core boot-time capability behind a feature flag.

[hooks.pre_seed] now works in all builds — standard and unified — without extra flags.

@chaodu-agent chaodu-agent requested a review from thepagent as a code owner June 25, 2026 03:55
pre-seed deps (aws-sdk-s3, flate2, tar) are already compiled for
other default features. No reason to gate it — it's a core boot-time
capability.
@chaodu-agent chaodu-agent force-pushed the fix/enable-pre-seed-unified branch from b72d759 to 98e417d Compare June 25, 2026 03:57
@chaodu-agent chaodu-agent changed the title build: enable pre-seed feature in unified Dockerfile build: make pre-seed a default feature Jun 25, 2026
@thepagent thepagent merged commit ed73d90 into main Jun 25, 2026
21 of 22 checks passed
thepagent pushed a commit that referenced this pull request Jun 27, 2026
* fix(ambient): bypass discord-level bot gating for ambient buffer

Bot messages in ambient-configured channels/threads were incorrectly
blocked by the discord-level bot message gating (allow_bot_messages mode
+ trusted_bot_ids) before reaching the ambient routing logic.

This caused ambient mode to never observe other bots' messages even when
[ambient.discord].allow_bot_messages = true, because the discord-level
gate runs first and returns early for non-@mention bot messages.

Fix: Move thread detection before bot gating and add an ambient
early-route that lets non-mention bot messages bypass discord-level
bot gating entirely. The ambient-level allow_bot_messages config
remains the sole gatekeeper for bot messages entering the ambient buffer.

Flow after fix:
1. Thread detection (moved up)
2. Ambient context check (moved up)
3. Bot msg + ambient context + no mention → ambient buffer (NEW)
4. Bot message gating (unchanged, but ambient msgs never reach here)
5. Normal ambient routing (handles human msgs + bot @mentions)

Closes #1197

* add debug tracing to ambient early-route paths

Adds tracing::debug logs for both the buffered and rejected paths
in the ambient early-route block, making it easier to diagnose
ambient bot message routing issues.

* perf: early-gate bot msgs when ambient is disabled

Avoid unnecessary to_channel() API calls for non-mention bot messages
when ambient mode is not configured. Previously these would have been
rejected at bot gating without the extra async call; moving thread
detection up should not regress that path.

When ambient is None and allow_bot_messages is Off or Mentions, non-
mention bot messages return immediately without hitting to_channel().
When allow_bot_messages is All, thread detection is still needed for
normal dispatch, so we fall through.

---------

Co-authored-by: 超渡法師 <超渡法師@openab.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants