feat(serenity): bump project-engine-client to 1.2.0 and document v1/v2 read drift#2699
Conversation
…2 read drift Bump @adobe/spacecat-shared-project-engine-client 1.1.1 -> 1.2.0. The client moved aio/init_status from /v1 to /v2 and removed the /v1 route, so getInitStatus now reads /v2/.../aio/init_status (init_status is a readiness boolean, not draft settings, so v2's live-view is fine). Address adjustments tracked in spacecat-api-service issue 2687: - Item 2 (v1/v2 read drift): document the live-layer prompt-read semantics on listPromptsByTags and listTagsForProject (prompt reads are v2/live-only, no v1 variant exists), and add ADR-006 with the per-read layer map. - Item 1 (PUT /serenity/models republish): add a guard test pinning that the standalone model-edit path always republishes and that body publish flags cannot suppress it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
This PR will trigger a minor release when merged. |
There was a problem hiding this comment.
Hey @rainer-friederich,
Verdict: Approve - well-scoped dependency bump with thorough documentation and a solid guard test.
Complexity: HIGH - medium diff; dependency bump with expanded transitive surface.
Changes: Bumps project-engine-client from 1.1.1 to 1.2.0, moves getInitStatus from /v1 to /v2 (route removed upstream), adds ADR-006 documenting the v1/v2 read-layer split, and pins the model-edit republish contract with a guard test (8 files).
Note: Recommend a human read before merge - this change amends an architectural decision record in docs/decisions/. The bot review is a complement to, not a replacement for, a human read here.
Non-blocking (3): minor issues and suggestions
- nit: ADR-006 table describes writes as "mixed" without enumerating which operations use v1 vs v2; a future developer adding a write has no guidance from this row -
docs/decisions/006-serenity-v1-v2-read-drift.md:50 - nit: Lockfile top-level specifier records
^1.2.0while package.json pins exact1.2.0; functionally harmless (npm resolves from the lock entry) but would drift on a fresh install without the lockfile -package-lock.json:31 - suggestion: Consider a single canonical pointer comment at the top of
rest-transport.jsreferencing ADR-006 for developers adding new endpoints who may not discover the per-method JSDoc -src/support/serenity/rest-transport.js:1
Skill: pr-review | Model: us.anthropic.claude-opus-4-6-v1[1m] | Duration: 14m 26s | Cost: $7.60 | Commit: 36960631ca88abb7382abe855a1449dba912fd62
If this code review was useful, please react with 👍. Otherwise, react with 👎.
- ADR-006: clarify the writes row is per-op/contract-only (version does not affect draft-faithfulness; per-method map lives in the transport JSDoc) so a developer adding a write has guidance. - rest-transport.js: add a top-of-file pointer to ADR-006 for the v1/v2 read-layer choice when adding endpoints. - package-lock.json: pin the top-level project-engine-client specifier to exact 1.2.0 to match package.json (was a stray ^1.2.0 from the install). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed all three non-blocking items from the MysticatBot review in MysticatBot (non-blocking):
Also rebased onto the latest Noted your callout that this amends an ADR and merits a human read — agreed; leaving that for the CODEOWNER. |
# [1.603.0](v1.602.1...v1.603.0) (2026-06-26) ### Bug Fixes * **llmo:** temporary cloudflareToken body/query fallback for CF token ([#2701](#2701)) ([b929f76](b929f76)), closes [#2681](#2681) [#2697](#2697) ### Features * add POST /sites/:siteId/entitlements admin endpoint ([#2665](#2665)) ([4374fc4](4374fc4)) * **serenity:** bump project-engine-client to 1.2.0 and document v1/v2 read drift ([#2699](#2699)) ([a1ea182](a1ea182)), closes [Hi#level](https://github.com/Hi/issues/level) [#2584](#2584)
|
🎉 This PR is included in version 1.603.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
1. Abstract
Bumps
@adobe/spacecat-shared-project-engine-clientfrom 1.1.1 to 1.2.0 and lands two Serenity/Semrush implementation adjustments tracked in the running issue: documentation of the v1/v2 read-layer split, and a guard test for the model-edit republish contract.2. Reasoning
1.2.0 is
lateston npm and moves the Semrushaio/init_statusroute from/v1to/v2, removing the/v1route from the generated contract — so the transport must follow or it no longer type-checks. While in this code, two adjustments from the migration-readiness review (serenity-docs risk analysis) were closed: the v1/v2 read-drift that silently misreads an unpublished draft as empty/US, and locking in that a standalone model-set edit always republishes to the live layer.3. High-level overview of the changes
getInitStatus, which now callsGET /v2/workspaces/{id}/projects/{id}/aio/init_status(the/v1route was removed upstream).init_statusis an AIO-readiness boolean, not draft settings, so reading it from v2's live-view carries no draft-faithfulness concern. The other 1.2.0 changes (several response fields tightened to required;addAiModel200→201;createProjectTagsresponse object→array) are inert here — those consumers discard the response body and the transport'sunwrapaccepts anyresponse.ok.listPromptsByTags) has no v1 variant, so it inherently reads the live (published) layer; an unpublished draft therefore reads empty (the "201-but-count-0" source). Added explaining comments onlistPromptsByTagsandlistTagsForProject, and a new ADR recording which layer each Serenity read observes (v1 = draft settings, v2 prompts = live-only).PUT /serenity/modelspath defaultspublish: true; only brand-create batches its own publish). Added a guard test pinning that apublish/publishModeflag smuggled into the request body cannot suppress the republish.No customer-visible API shape change; the
/serenity/*surface consumed by elmo is unchanged.4. Required information
6. Additional information outside the code
pathstypes to scope the bump: confirmedaio/init_statusis the only route that moved (v1 removed, v2 added) and that prompts remain v2-only in 1.2.0 (no v1by_tagsvariant exists), which is why issue item 2 is documentation rather than a version swap.addAiModel(markets.js) andcreateProjectTags(markets-subworkspace.js) both discard the response body, andunwrapgates onresponse.okrather than a literal200.7. Test plan
GET /serenity/markets/:geoTargetId/:languageCode) which triggersgetInitStatus, and confirminitializedstill resolves (now served by the v2 route). No prod/stage-specific steps — the change is an internal upstream-contract follow + docs/tests.8. Deployment & merge order
🤖 Generated with Claude Code