Skip to content

AEON: make six-Aspect trusted publisher contract uniform - #3631

Open
StephGlansberg wants to merge 2 commits into
block:mainfrom
StephGlansberg:codex/aeon-aspect-reply-prompts
Open

AEON: make six-Aspect trusted publisher contract uniform#3631
StephGlansberg wants to merge 2 commits into
block:mainfrom
StephGlansberg:codex/aeon-aspect-reply-prompts

Conversation

@StephGlansberg

Copy link
Copy Markdown

Outcome\n\n- renders one shared six-Aspect private-office publication contract with exact room/tool substitutions\n- makes credential isolation, trusted inbound envelope, turn receipts, and exact base prompt fail closed as one configuration\n- adds operator semantic-health gating so running + agent_pool_ready is not sufficient\n- keeps fixed Gateway sessions, full OpenClaw tool/memory/identity ownership, and bypassPermissions posture unchanged\n\n## Proof\n\n- node --test deploy/local/aeon-aspects/worker.test.mjs (22/22)\n- cargo test -p buzz-acp (671/671 + lifecycle 9/9)\n- cargo clippy -p buzz-acp --all-targets -- -D warnings\n- cargo fmt --all -- --check\n- git diff --check\n\nRepository-wide pre-push also passed Desktop tests (3779/3779) and relevant Rust gates. Existing upstream failures remain in the Desktop file-size ratchet (desktop/src-tauri/src/archive/mod_tests.rs) and one Mobile test; neither path is changed here.\n\nNo Gateway or worker runtime mutation is part of this PR.

@StephGlansberg
StephGlansberg requested a review from a team as a code owner July 29, 2026 22:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 198067b874

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +585 to +588
if !forward_buzz_publisher_credentials {
cmd.env_remove("BUZZ_RELAY_URL");
cmd.env_remove("BUZZ_PRIVATE_KEY");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove all private-key sources from isolated children

When the harness is configured through the documented BUZZ_PRIVATE_KEY_FILE environment variable while --no-agent-publisher-credentials is enabled, this only removes BUZZ_PRIVATE_KEY, so the child inherits the key-file path and, because it runs as the same user, can read the required 0600 file and recover the signing key. The legacy BUZZ_ACP_PRIVATE_KEY alias and persona-provided key-file variables are likewise not treated as harness-bound, defeating the publisher-isolation contract; strip every supported private-key source and alias from both inherited and injected child environments.

Useful? React with 👍 / 👎.

rootIds: readonly string[],
): Promise<RelayEvent[]> {
const replies: RelayEvent[] = [];
const cappedRoots = rootIds.slice(0, MAX_FLATTEN_ROOTS);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not drop reply hydration after forty roots

When a private/DM channel window contains more than 40 roots with thread summaries, this slice silently omits every later root, so their non-broadcast replies never appear in the flattened timeline. This is permanent for older pages as well: the next pagination pass builds knownRootIds from all retained summaries, including the roots skipped here, and therefore never retries them; process all roots in bounded batches rather than discarding the remainder.

Useful? React with 👍 / 👎.

Comment on lines +28 to +31
for (const rootId of cappedRoots) {
let cursor: ThreadCursor | null = null;
for (let page = 0; page < MAX_THREAD_PAGES; page += 1) {
const response = await getThreadReplies(rootId, channelId, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid serially blocking channel loading on thread hydration

Opening or refetching a private room/DM awaits this helper before useChannelMessagesQuery returns even the already-fetched root messages, while this loop performs every root and page request sequentially. A window with 40 one-page threads therefore needs 40 consecutive relay round trips before rendering, and the configured bounds permit up to 2,000 sequential requests, making a slow relay leave the entire channel loading for an excessive period; hydrate roots concurrently with a bound or publish the reconciled timeline before background reply hydration.

Useful? React with 👍 / 👎.

Signed-off-by: StephGlansberg <StephGlansberg@users.noreply.github.com>
@StephGlansberg
StephGlansberg force-pushed the codex/aeon-aspect-reply-prompts branch from baf5a82 to d102c84 Compare July 29, 2026 23:10
@StephGlansberg

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d102c84986

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +60 to +61
if batch.events.len() != 1 {
return Err("ambiguous_event_count");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Split trusted queued batches instead of dropping them

When two or more events accumulate for a channel while its agent is busy, EventQueue::flush_next drains them into one batch (up to 50 events), so this check rejects the entire batch as ambiguous_event_count. The refusal path then sends PromptOutcome::Error with no recoverable batch, permanently discarding every queued user message; this is especially likely for the new Aspect configuration because it explicitly uses queue handling and allows two-hour turns. Dispatch trusted events individually or otherwise preserve and requeue the unprocessed events.

Useful? React with 👍 / 👎.

Comment on lines 454 to +458
.filter(
(message) =>
message.parentId == null || isBroadcastReply(message.tags ?? []),
flattenReplies ||
message.parentId == null ||
isBroadcastReply(message.tags ?? []),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude replies whose roots left the refreshed window

After a private/DM user has paged older history, a head refetch replaces the window with only its newest page, but reconcileChannelWindowMessages deliberately retains every cached non-broadcast reply, including replies hydrated for roots in the discarded tail pages. This new unconditional flattening then renders those retained replies as depth-zero posts even though their roots are no longer in the window, leaving stale orphaned messages in the main timeline after reconnect or refetch. Restrict flattened cache-only replies to roots retained by the current window, or clear the hydrated tail replies when the authoritative page chain is replaced.

Useful? React with 👍 / 👎.

Signed-off-by: StephGlansberg <StephGlansberg@users.noreply.github.com>
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.

1 participant