Skip to content

feat(models): support AI map edit jobs (PPT-2832) - #334

Merged
camreeves merged 6 commits into
masterfrom
PPT-2832-ai-map-review
Oct 19, 2026
Merged

camreeves merged 6 commits into
masterfrom
PPT-2832-ai-map-review

Conversation

@camreeves

@camreeves camreeves commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Add MAP_EDIT jobs, an optional provider text model and Anthropic provider support for the Concierge map editor. Keep image and map quota/usage totals separable by job kind.

Includes additive migrations for the column and enum constraints. The API draft depends on this branch. Draft for review and end-to-end testing; do not merge independently of the API rollout.

Validation: branch migrations applied on the isolated local API database; 57 focused API adapter/prompt/controller specs pass against these models. Five browser map-edit comparisons completed with booking IDs preserved. Focused model specs pass: 29 examples against fresh branch migrations. An existing random fixture-name collision was made deterministic.

Companion API: PlaceOS/rest-api#453
Frontend: PlaceOS/user-interfaces#570

Companion drafts: Frontend #570, API #453, Models #334.

camreeves and others added 4 commits October 12, 2026 19:05
PPT-2833. The signage AI provider rows will also serve AI map editing in
Concierge, which calls a text/vision model rather than an image model, so a
row gains a nullable text_model column (nil means the adapter's default).
Map edits reuse the job table as a third kind, MAP_EDIT, which the kind CHECK
now admits; one vendor call per job, so the quota unit stays "candidates".

sum_candidates and sum_candidates_for_authority take an optional kind so the
map quotas are counted apart from the image quotas; usage is grouped by kind
as well and UsageRow carries it, with an optional kind filter for the map
usage route. An index on (kind, created_at) serves both.

Migration 20261014100500000, numbered above the newest merged migration
(20261013100500000); renumber before merging if another lands first.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`sum_candidates`, `sum_candidates_for_authority` and `usage` take a kind,
a list of kinds or nil. The image quota in rest-api asks for both image
kinds at once, which a single kind could not express without two queries.
The IN clause is built with one placeholder per label; nil still sums
every kind, so the existing call sites are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider rows may point at Anthropic: the check constraint takes the new
value and the enum answers anthropic?.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Brings in multiple root groups so the rest-api branch, which pins this
branch until it is released, sees the same models as rest-api master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Oct 15, 2026
20261014100500000 was taken twice: by alter_signage_ai_for_maps on this
branch and by master's alter_groups_allow_multiple_roots. micrate records
migrations by version, so whichever ran first stopped the other, and with
master merged the multiple-roots migration was skipped and the group specs
failed. The two AI map editing migrations move to 20261016100500000 and
20261016110500000. Both are idempotent, so a database that already ran them
under the old versions is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the type: enhancement new feature or request label Oct 15, 2026
@camreeves

Copy link
Copy Markdown
Contributor Author

Merge-readiness pass (Steve reported clashes). This PR is now up to date with master and green.

  • c687a35, merged master (9.119.5, multiple root groups). No textual conflicts.
  • 16b8405, renumbered this PR's two migrations. The real clash: 20261014100500000 was used twice, by this branch's alter_signage_ai_for_maps (added 12 Oct) and by master's alter_groups_allow_multiple_roots (added 14 Oct). micrate tracks migrations by version, so whichever ran first stopped the other one from ever running. With master merged, the multiple-roots migration was skipped and four group specs failed on the old single-root constraint. The AI map migrations are now 20261016100500000 and 20261016110500000. Both are idempotent (IF NOT EXISTS / DROP ... IF EXISTS), so a database that already ran them under the old numbers is fine.

The collision was not Codex's doing. The 12 Oct commit chose a future date (14 Oct) so the migration would sort after master's newest, and master later used the same date pattern.

CI: specs pass on crystal latest and unstable.

Merge order for the three PPT-2832 PRs: models #334 first, then cut a models release. See rest-api #453 for the pins that need swapping before that PR can merge.

🤖 Generated with Claude Code

@camreeves
camreeves marked this pull request as ready for review October 19, 2026 04:08
@camreeves
camreeves merged commit 47d0437 into master Oct 19, 2026
8 checks passed
@camreeves
camreeves deleted the PPT-2832-ai-map-review branch October 19, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant