Skip to content

feat: preserve scoped Topics settings in observability templates - #409

Merged
Stephen Belanger (Qard) merged 13 commits into
mainfrom
max/observability-template-automation-settings
Oct 16, 2026
Merged

Stephen Belanger (Qard) merged 13 commits into
mainfrom
max/observability-template-automation-settings

Conversation

@max-braintrust

@max-braintrust max-braintrust commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #422, which isolates the ESM eval CI fix. Merge that PR first.

Carry a facet's Topics automation settings when copying it between projects.

Schema v2 adds topics_automations: each referenced automation's name, description, and API-returned config. This includes scope, automation filter, sampling, model, status, and timing. Project-specific facet_functions and topic_map_functions are excluded and rebuilt in the destination.

Pull selects settings by bound automation ID and repeats that selection after the facet picker. An unrelated same-name automation does not block export. IDs stay internal; template references remain names.

Push behavior:

  • New automation: use the bundled settings and description.
  • Matching settings and description: retain them without requiring force for the settings. Existing facet/preprocessor replacement rules still apply.
  • Different settings or description: require --force. Replace settings in full while preserving destination wiring. Destination-only settings are dropped and the description can be cleared.
  • --topics-automation: use the selected destination's settings instead.

Version 1 templates remain readable. Specific experiment IDs produce an error naming the facet and automation because they cannot be carried between projects. Timing validation and normalization stay on the server.

Checks: 24 focused observability tests passed, covering settings round trips, push cases, API request contents, and automation-ID selection. Formatting and Clippy passed, with the existing root enum warning suppressed. A live pull verified three prompt facets, their shared saved preprocessor, and span-scoped Topics settings. No live destination push was performed. No backend changes are required.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Latest downloadable build artifacts for this PR commit 75ade0b24566:

Available artifact names
  • artifacts-build-local-x86_64-apple-darwin
  • artifacts-build-local-aarch64-pc-windows-msvc
  • artifacts-build-global
  • artifacts-build-local-x86_64-pc-windows-msvc
  • artifacts-build-local-aarch64-apple-darwin
  • cargo-dist-cache
  • artifacts-plan-dist-manifest
  • artifacts-build-local-x86_64-unknown-linux-musl
  • artifacts-build-local-x86_64-unknown-linux-gnu
  • artifacts-build-local-aarch64-unknown-linux-gnu

@max-braintrust
max-braintrust force-pushed the max/observability-template-automation-settings branch from 19f9192 to f7c6f42 Compare October 8, 2026 22:24
@max-braintrust
max-braintrust changed the base branch from main to max/observability-duplicate-topic-map-repair October 8, 2026 22:24
@max-braintrust
max-braintrust force-pushed the max/observability-template-automation-settings branch from 592624f to aff70a4 Compare October 13, 2026 17:02
@max-braintrust
max-braintrust force-pushed the max/observability-duplicate-topic-map-repair branch from b3261bb to 494b7e4 Compare October 13, 2026 17:02
@max-braintrust
max-braintrust force-pushed the max/observability-template-automation-settings branch from bc85730 to e375291 Compare October 14, 2026 17:28
@max-braintrust
max-braintrust marked this pull request as ready for review October 14, 2026 17:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T18:02:52.053394Z c78e99e Draft marked ready
ℹ️ About Codex in GitHub

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

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: c78e99e6a0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

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

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

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

Comment thread src/observability/template.rs Outdated
Stephen Belanger (Qard) pushed a commit that referenced this pull request Oct 15, 2026
Stack 1/2. Base: `main`. Next: [scoped Topics settings
(#409)](#409). Review and merge
this PR first.

Older template pushes could attach another map when a facet already had
one under a different slug. Later pushes failed on those multiple maps.
Repair also removed the facet and map from other automations, even when
those bindings were valid.

With `--force`, push selects the map with the generated template slug,
or creates it if needed. It detaches superseded maps only from the
selected destination automation. Other automations keep their facet and
map bindings.

An existing matching map retains its customization and saved state. A
newly created map needs generation before it can classify. Push does not
regenerate topics or replay historical classifications.

Detached map functions remain in the project and are listed in human and
JSON output. They may still be referenced by other automations.

The removal planner takes only the destination mutations, selected
destination key, and superseded maps. Its four unused parameters have
been removed.

Checks: 17 focused `active_observability` tests passed, including
selected-map replacement and preservation of another automation's
shared-facet binding. Cargo formatting and `git diff --check` passed.
Both branches include current main.
Base automatically changed from max/observability-duplicate-topic-map-repair to main October 15, 2026 09:13
Declare vite-node in both ESM retry fixtures so Node 20 does not depend on an on-demand npm install.
Declare vite-node in both ESM retry fixtures so Node 20 does not depend on an on-demand npm install.
@max-braintrust
max-braintrust changed the base branch from main to max/fix-esm-eval-retry October 16, 2026 08:01
Stephen Belanger (Qard) pushed a commit that referenced this pull request Oct 16, 2026
Fix the ESM eval retry failures uncovered by Node 20 CI on #409. The
underlying issues already exist on main.

- Use the existing awaited vite-node entrypoint for automatic ESM
retries. #203 added this entrypoint but missed the retry path.
- Add vite-node to both retry fixtures so tests install it upfront. Node
20's npm resolver crashes when the fixtures fetch it through npx at
runtime.

Validation: the Node 20 eval fixture cohort passed locally. All CI
checks passed with this patch on #409; this PR isolates the same
three-file change for review.

Merge this before #409, which is stacked on this branch.
Base automatically changed from max/fix-esm-eval-retry to main October 16, 2026 16:13
@Qard
Stephen Belanger (Qard) merged commit a02bb12 into main Oct 16, 2026
30 checks passed
@Qard
Stephen Belanger (Qard) deleted the max/observability-template-automation-settings branch October 16, 2026 16:17
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