Skip to content

feat(BA-8673): add bootstrap script created_at and searchable fields - #15987

Merged
HyeockJinKim merged 3 commits into
mainfrom
feat/BA-8673
Oct 22, 2026
Merged

HyeockJinKim merged 3 commits into
mainfrom
feat/BA-8673

Conversation

@seedspirit

@seedspirit seedspirit commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add created_at to bootstrap_scripts through CreatedAtMixin (migration 51d33226c0a5, server default now()), and carry it on BootstrapScriptData.
  • Add BootstrapScriptSearchableFields and build BootstrapScriptData there; the row's to_data() is removed, and the creator, purger, querier and updater convert through BootstrapScriptSearchableFields.own.to_data(row).
  • The script body is user-written, so its filter and order slots stay empty.

There is no updated_at: script edits are planned to land as revision rows (bootstrap_script_revisions), whose created_at records when the content last changed. A column on the script row would duplicate that.

No read path changes yet: BootstrapScriptQuerier keeps its current query. With the searchable fields in place, a follow-up can read a user's script through search_with_scopes.

Test plan

  • pants lint / pants check on the changed files
  • alembic heads reports a single head
  • tests/component/config::, tests/unit/manager/repositories/user::
  • CI

Resolves BA-8673

🤖 Generated with Claude Code

BootstrapScriptRow gains created_at and updated_at through
LifecycleTimestampsMixin, and BootstrapScriptSearchableFields now builds
BootstrapScriptData instead of a to_data method on the row. The script body
is user-written, so it carries no filter or order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:L 100~500 LoC comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated labels Oct 22, 2026
@seedspirit seedspirit changed the title refactor(BA-8673): add bootstrap script timestamps and searchable fields feat(BA-8673): add bootstrap script timestamps and searchable fields Oct 22, 2026
@seedspirit
seedspirit marked this pull request as ready for review October 22, 2026 05:29
@seedspirit
seedspirit requested a review from a team as a code owner October 22, 2026 05:29
Copilot AI balanced review requested due to automatic review settings October 22, 2026 05:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused schema and conversion changes are consistent across existing operations, with no unresolved blocking findings.

No open issues 🎉

What changed in this PR

Adds lifecycle timestamps and searchable fields for bootstrap scripts, preparing the manager model for future scoped searches without changing the current read query.

Changes:

  • Adds created_at and updated_at columns with database defaults and exposes them in BootstrapScriptData.
  • Centralizes row-to-data conversion in BootstrapScriptSearchableFields across existing operations.
  • Defines filtering and ordering for metadata fields while excluding the user-written script body.
File Description
src/​ai/​backend/​manager/​models/​bootstrap_script/​updaters.py Uses the shared converter for update results.
src/​ai/​backend/​manager/​models/​bootstrap_script/​searchable_fields.py Defines searchable metadata and timestamp-aware conversion.
src/​ai/​backend/​manager/​models/​bootstrap_script/​row.py Adds the timestamp mixin and removes row-local conversion.
src/​ai/​backend/​manager/​models/​bootstrap_script/​queriers.py Uses the shared converter without changing the query.
src/​ai/​backend/​manager/​models/​bootstrap_script/​purgers.py Uses the shared converter for purge results.
src/​ai/​backend/​manager/​models/​bootstrap_script/​creators.py Uses the shared converter for creation results.
src/​ai/​backend/​manager/​models/​alembic/​versions/​51d33226c0a5_add_timestamps_to_bootstrap_scripts.py Adds timestamp columns and corresponding downgrade operations.
src/​ai/​backend/​manager/​data/​bootstrap_script/​types.py Carries creation and update timestamps in script data.
changes/​15987.feature.md Documents timestamps and centralized conversion.

Review effort: Balanced

Script edits will be recorded as revisions, whose created_at tells when the
content last changed, so updated_at on the script row would duplicate it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@seedspirit seedspirit changed the title feat(BA-8673): add bootstrap script timestamps and searchable fields feat(BA-8673): add bootstrap script created_at and searchable fields Oct 22, 2026

@HyeockJinKim HyeockJinKim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Applying this revision might cause some issues, so please just take a quick look at it.

@HyeockJinKim
HyeockJinKim merged commit 9fdacf4 into main Oct 22, 2026
45 of 46 checks passed
@HyeockJinKim
HyeockJinKim deleted the feat/BA-8673 branch October 22, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants