fix(cert): A2B success_criteria as {id,text} objects (unbreak main)#4535
Merged
Conversation
Migration 478 shipped success_criteria as plain strings; SuccessCriterion is
{ id, text } and demonstrations-fairness asserts every criterion has an id, so
main has been red on Server integration tests since PR #3398. Migration 479
converts each string criterion to { id: <ex>_c<n>, text: <string> }. Idempotent
— pre-existing object criteria pass through unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exercise_definitions[].success_criteriaas plain strings.SuccessCriterionis{ id, text }(server/src/db/certification-db.ts:48-51), andserver/tests/integration/demonstrations-fairness.test.ts:105asserts every criterion has an id.Server integration testshas been failing onmainsince docs(learning): add A2B hands-on lab module — Testing Your First Agent #3398 merged — confirmed on run 25856546952. All open PRs (mine included: fix(admin): full IANA timezone list in events + meetings forms #4532) are blocked behind this.{id: "<exercise_id>_c<n>", text: <string>}. Idempotent —CASE WHEN jsonb_typeof = 'string'skips entries already in object form, so re-running is safe and any future hand-edits to objects survive.Verification
a2b_ex1..a2b_ex4now render as{id, text}with idsa2b_ex1_c1,a2b_ex1_c2, …,a2b_ex4_c3.vitest run server/tests/integration/demonstrations-fairness.test.ts→ 13/13 pass locally (was 12/13 with the same DB pre-479).Test plan
/learningstill renders exercises correctly post-migration🤖 Generated with Claude Code