fix(addie): stop Sage passing demo.example.com as brand_id in C2 demos#4075
Draft
fix(addie): stop Sage passing demo.example.com as brand_id in C2 demos#4075
Conversation
The system prompt unconditionally appended "Use brand domain demo.example.com for the account" for all active certification modules. In module C2 (Brand Protocol), Sage interpreted this as the brand_id for get_brand_identity — which expects roster IDs like daan_janssen — causing REFERENCE_NOT_FOUND and falling back to spec-only teaching. Fix: remove the unconditional instruction. In the per-lesson demo block (already gated on demo_scenarios), emit buyer-domain guidance only for acquire_rights/sync_accounts scenarios, and brand_id guidance only for get_brand_identity scenarios. Apply the same guard to both the start_certification_module and get_certification_module render paths. Also de-hardcode "get_products" from the generic teaching rules so non-sales modules get correct tool guidance. Bump CODE_VERSION to 2026.05.1 for the buildCertificationContext change. https://claude.ai/code/session_019qaFNRgQ5bht7PNJpgHmiR
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.
Closes #4074
During certification module C2 (Brand Protocol), the system prompt unconditionally appended
"Use brand domain "demo.example.com" for the account."for all active modules. When C2 was active, Sage interpreteddemo.example.comas thebrand_idforget_brand_identity, which expects roster IDs likedaan_janssen— returningREFERENCE_NOT_FOUNDand falling back to spec-only teaching.Root cause:
buildCertificationContext(line 557) appended the buyer-domain hint with no module guard. For brand-track modules, Sage conflated "brand domain" withget_brand_identity'sbrand_idparameter.Changes:
demo.example.cominstruction from the top-level sandbox-agent block (line 557)start_certification_moduleandget_certification_moduledemo-scenario blocks (already gated onlp.demo_scenarios?.length): emit buyer-domain guidance only whenacquire_rights/sync_accountsis in the scenario tools; emitbrand_id-roster guidance only whenget_brand_identityis in the toolsget_productsreference in the generic teaching rule (line 510) so non-sales-track modules get correct tool guidance; add "if the module has demo scenarios" guardno more get_products calls→no more sandbox tool callsin the mastery fast-track rule for consistencyCODE_VERSION→2026.05.1for thebuildCertificationContextbehavior changeNon-breaking justification: server-side Addie system-prompt change only; no schema, protocol, or wire format touched. Changeset is
--empty.Pre-PR review:
get_certification_modulehandler;CODE_VERSIONnot bumped), both fixed before this PR was opened. One nit (symmetry in.includesvs.some) surfaced in PR body.daan_janssenis the correct C2 canonical example; flagged one blocker (line 510 fires for modules with no demo_scenarios), fixed. IACET-relevant: broken demo constitutes mismatch between stated and delivered instruction.Nits (not fixed, noted for follow-up):
c2_ex3success criteria don't include a step that callsget_brand_identitywithauthorized: trueto demonstrate theavailable_fieldspattern — minor criterion-coverage gap (separate issue)scenarioTools.includes('get_brand_identity')vs.some(t => t === 'get_brand_identity')— minor style inconsistency, not functionalSession: https://claude.ai/code/session_019qaFNRgQ5bht7PNJpgHmiR
Generated by Claude Code