From 6fc25b8a8247c660f969a1709dca4236276a9496 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 13:35:07 +0800 Subject: [PATCH 01/20] feat(big5): add W2 English result content assets --- .../en_parity/w2_result_content_v1/README.md | 32 +++ .../claim_boundary_report.json | 34 +++ .../w2_result_content_v1/content_assets.jsonl | 16 ++ .../duplicate_report.json | 10 + .../editorial_self_review.json | 30 +++ .../package_manifest.json | 65 +++++ .../w2_result_content_v1/sha256_manifest.json | 17 ++ .../w2_result_content_v1/source_ledger.json | 24 ++ .../surface_coverage.json | 32 +++ .../w2_result_content_v1/translation_map.json | 30 +++ .../w2_result_content_v1/validate_package.php | 135 +++++++++++ .../en-parity-w2-big-five-result-assets.md | 42 ++++ ...n-parity-w2-big-five-result-assets.v1.json | 57 +++++ .../BigFiveEnglishResultAssetPackageTest.php | 228 ++++++++++++++++++ docs/codex/pr-train-state.json | 62 +++++ docs/codex/pr-train.yaml | 53 ++++ 16 files changed, 867 insertions(+) create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/claim_boundary_report.json create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/editorial_self_review.json create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/translation_map.json create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php create mode 100644 backend/docs/seo/en-parity-w2-big-five-result-assets.md create mode 100644 backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json create mode 100644 backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md new file mode 100644 index 000000000..e8b9bc8fd --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md @@ -0,0 +1,32 @@ +# Big Five W2 English Result Content Package + +This directory contains 16 backend-authoritative English content asset groups for the frozen W2 Big Five result/report/share/PDF/history inventory. + +The package is a producer draft for manual review. It is not a runtime registry, selector input, importer payload, CMS write authorization, W9 QA report, production release, or deployment artifact. + +## Frozen source + +- Inventory PR: `EN-PARITY-W2-BIG5-INVENTORY-01` / PR 1866 +- Inventory merge: `897490e4baa31fe197ee50c89f0c3fae6bac408d` +- Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` + +## Safety and authority + +- All assets are `pending_manual_review`. +- `runtime_use` is `draft_review_only`. +- Runtime, production, CMS, database, release, indexability, search, and deploy permissions remain false. +- Share copy contains no scores, percentiles, attempt IDs, tokens, or private links. +- PDF and history copy remain private-reader surfaces. +- Analytics reader labels contain no internal metric IDs or personal result data. +- The existing zh-CN registry, runtime selector, importer, schema, and public APIs are unchanged. + +## Validation + +Run: + +```bash +php backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php +cd backend && php artisan test tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php --no-ansi +``` + +Both checks fail closed on unit drift, duplicate coverage, malformed JSON/JSONL, CJK leakage, private-field leakage, forbidden claims, permission drift, or SHA mismatch. diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/claim_boundary_report.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/claim_boundary_report.json new file mode 100644 index 000000000..1ae6f29b7 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/claim_boundary_report.json @@ -0,0 +1,34 @@ +{ + "schema_version": "fermatmind.big5.en_parity.claim_boundary_report.v1", + "review_type": "codex_skeptical_self_review", + "status": "pending_manual_review", + "human_reviewed": false, + "editorial_approved": false, + "qa_pass": false, + "language_contract": { + "continuous_dimensions": true, + "probabilistic_contextual_language": true, + "high_is_not_better": true, + "low_is_not_worse": true, + "fixed_identity_claims": false + }, + "forbidden_claims": [ + "clinical diagnosis or treatment advice", + "hiring, admission, or screening decision", + "precise career match", + "intelligence, ability, or moral ranking", + "income, success, performance, or relationship guarantee", + "unsupported reliability, validity, norm, or percentile claim" + ], + "privacy_contract": { + "raw_scores": false, + "score_vectors": false, + "percentiles": false, + "attempt_ids": false, + "report_tokens": false, + "private_urls": false, + "personal_result_analytics": false + }, + "findings": [], + "decision": "PASS_FOR_DRAFT_PACKAGE_ONLY" +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl new file mode 100644 index 000000000..4c410da35 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl @@ -0,0 +1,16 @@ +{"asset_id":"big5.en.w2.free_preview","unit":"free_preview","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your Big Five snapshot","body":"This preview highlights a few tendencies that may be more noticeable in your current responses. It is a starting point for reflection, not a fixed description of who you are.","bullets":["Notice which patterns feel familiar in more than one context.","Keep in mind that habits can shift with roles, demands, and experience.","Use the full report to explore all five dimensions and their facets."]}} +{"asset_id":"big5.en.w2.locked_result","unit":"locked_result","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"More detail is available in the full report","body":"Your saved result can include dimension explanations, facet-level context, and practical reflection prompts. Access describes which report sections are available; it does not imply a more certain or more favorable result.","cta":"View report options"}} +{"asset_id":"big5.en.w2.paid_full_report","unit":"paid_full_report","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your full Big Five report","intro":"Read the report as a set of working hypotheses. Each dimension describes a continuum, and the pattern may appear differently across work, relationships, stress, and unfamiliar situations.","section_intro":"Explore the five dimensions, the facets within them, and actions you may want to test. No single score defines your ability, character, or future.","closing":"Keep what is useful, question what does not fit, and revisit the result alongside real examples from your life."}} +{"asset_id":"big5.en.w2.entitlement_levels","unit":"entitlement_levels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"levels":[{"key":"preview","label":"Preview","description":"A short, private snapshot of selected tendencies."},{"key":"core","label":"Core result","description":"All five dimension ranges with concise explanations."},{"key":"full","label":"Full report","description":"Dimension and facet context, reflection prompts, and practical action ideas."}],"boundary":"Access levels describe available content only. They do not indicate result quality, certainty, or personal potential."}} +{"asset_id":"big5.en.w2.five_dimension_explanations","unit":"five_dimension_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"dimensions":[{"code":"O","title":"Openness to Experience","body":"This dimension reflects how readily you may explore unfamiliar ideas, perspectives, aesthetics, and ways of doing things. Different contexts can call for curiosity, continuity, or a blend of both."},{"code":"C","title":"Conscientiousness","body":"This dimension reflects how you may organize effort, follow plans, and manage responsibilities. Structure can support reliability, while flexibility can help when priorities change."},{"code":"E","title":"Extraversion","body":"This dimension reflects how you may engage with social stimulation, activity, and outward expression. Quiet and energetic settings can each support different kinds of contribution."},{"code":"A","title":"Agreeableness","body":"This dimension reflects how you may balance cooperation, trust, candor, and personal boundaries. Effective interaction can involve both consideration and clear disagreement."},{"code":"N","title":"Emotional Sensitivity","body":"This dimension reflects how readily you may notice stress, threat, or emotional shifts. Sensitivity can provide early signals, while steadiness can support recovery; neither range determines resilience or worth."}]}} +{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Awareness","description":"Attention to emotional nuance in yourself and in situations."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Low Mood Sensitivity","description":"Readiness to notice discouragement, loss, or reduced energy."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Impulse Pressure","description":"Strength of immediate urges when emotion or reward is present."},{"code":"N6","label":"Stress Vulnerability","description":"Likelihood of feeling overloaded when demands accumulate."}]}} +{"asset_id":"big5.en.w2.score_range_boundary_copy","unit":"score_range_boundary_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Ranges describe relative tendencies in this response set, not grades or ability levels.","ranges":[{"key":"lower","label":"Lower range","description":"This tendency may be less prominent or may appear in narrower situations. Lower does not mean worse."},{"key":"middle","label":"Middle range","description":"You may shift between both sides of the dimension depending on context, role, or current demands."},{"key":"higher","label":"Higher range","description":"This tendency may appear more readily across situations. Higher does not mean better."}],"boundary":"Small differences near a range boundary should not be treated as a sharp change in personality."}} +{"asset_id":"big5.en.w2.action_growth_advice","unit":"action_growth_advice","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Turn the result into small experiments","actions":[{"context":"awareness","prompt":"Choose one tendency and write down two recent situations where it helped and one where it created friction."},{"context":"flexibility","prompt":"Try a low-risk behavior from the other side of the dimension and observe what changes."},{"context":"environment","prompt":"Adjust one cue, routine, or boundary so the behavior you want is easier to repeat."},{"context":"review","prompt":"Revisit the experiment after a week and keep only what was useful in that context."}],"boundary":"These are reflection ideas, not treatment, performance, or career prescriptions."}} +{"asset_id":"big5.en.w2.workplace_relationship_copy","unit":"workplace_relationship_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"workplace":{"title":"At work","body":"Your tendencies may shape how you plan, communicate, respond to change, and manage stimulation. Role expectations and team norms can strengthen or soften the pattern.","prompt":"Which working conditions help you contribute consistently, and which require deliberate adjustment?"},"relationships":{"title":"In relationships","body":"The same tendency may be helpful in one interaction and difficult in another. Consider communication habits, boundaries, repair, and the other person's context rather than ranking one style above another.","prompt":"What helps you stay clear and considerate when your preferences differ?"},"boundary":"This content does not predict job performance, determine employment decisions, rate relationship quality, or guarantee outcomes."}} +{"asset_id":"big5.en.w2.share_public_summary","unit":"share_public_summary","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"A Big Five reflection","summary":"I explored five broad personality dimensions as continua. The result offers context for reflection rather than a fixed identity or prediction.","privacy_note":"This public-safe summary contains no scores, percentiles, private result details, account identifiers, or report links.","allowed_fields":["title","summary","privacy_note"]}} +{"asset_id":"big5.en.w2.pdf_reader_content","unit":"pdf_reader_content","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"cover_title":"Your Big Five report","reader_note":"This private report is for your own reflection. Store or share it with care because it may contain personal result context.","method_note":"The report describes tendencies across five continuous dimensions. It does not diagnose a condition or determine ability, character, suitability, or future outcomes.","footer":"Private reader copy — not intended for public indexing.","public_url_allowed":false,"indexable":false}} +{"asset_id":"big5.en.w2.history_account_reentry","unit":"history_account_reentry","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"history_title":"Your saved Big Five results","history_body":"Return to a saved result to review the context and reflections available to your account. A previous result is a snapshot, not a permanent identity.","reentry_cta":"Open saved result","missing_state":"No saved Big Five result is available for this account.","privacy_note":"Use the signed-in account route. Do not copy private result links into public pages."}} +{"asset_id":"big5.en.w2.result_report_cta","unit":"result_report_cta","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"ctas":[{"key":"explore_dimensions","label":"Explore all five dimensions","support":"See how each continuum may show up in different contexts."},{"key":"review_facets","label":"Review the facets","support":"Look at the narrower tendencies within each dimension."},{"key":"try_reflection","label":"Choose a reflection prompt","support":"Turn one observation into a small, testable action."},{"key":"return_history","label":"Return to saved results","support":"Review your private report from your account."}],"boundary":"CTA copy describes navigation and available content only."}} +{"asset_id":"big5.en.w2.empty_error_expired_access_denied","unit":"empty_error_expired_access_denied","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"states":[{"key":"empty","title":"No result is available","body":"Complete the assessment or open a saved result from your account."},{"key":"error","title":"We could not load this result","body":"Try again later. No result details are shown while the request is incomplete."},{"key":"expired","title":"This access link is no longer valid","body":"Sign in and open the result from your account, or request a new authorized link."},{"key":"access_denied","title":"You do not have access to this result","body":"Use the account that owns the result. We do not reveal result details on this page."}],"fail_closed":true}} +{"asset_id":"big5.en.w2.mobile_desktop_consumption","unit":"mobile_desktop_consumption","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"shared_reader_copy":{"continue_label":"Continue reading","expand_label":"Show details","collapse_label":"Hide details","table_label":"Dimension overview","navigation_label":"Report sections"},"mobile_guidance":"Sections use the same meaning on smaller screens and may be opened one at a time for easier reading.","desktop_guidance":"Sections use the same meaning on larger screens and may appear side by side.","boundary":"Layout changes must not change entitlement, interpretation, or claim meaning."}} +{"asset_id":"big5.en.w2.analytics_reader_labels","unit":"analytics_reader_labels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"section_label":"Your reflection activity","reader_notice":"Reader-facing activity labels describe how report sections are used in aggregate. They do not display or transmit your trait scores in the label.","events":[{"key":"section_opened","label":"Section opened"},{"key":"reflection_started","label":"Reflection started"},{"key":"reflection_completed","label":"Reflection completed"},{"key":"report_returned","label":"Returned to report"}],"internal_metric_ids":[],"personal_result_fields":[],"boundary":"Reader labels must remain separate from internal metric identifiers and must not carry scores, score vectors, percentiles, attempt identifiers, report tokens, or private links."}} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json new file mode 100644 index 000000000..102630395 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json @@ -0,0 +1,10 @@ +{ + "schema_version": "fermatmind.big5.en_parity.duplicate_report.v1", + "asset_count": 16, + "unique_asset_id_count": 16, + "unique_unit_count": 16, + "duplicate_asset_ids": [], + "duplicate_units": [], + "exact_duplicate_content_hashes": [], + "decision": "PASS" +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/editorial_self_review.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/editorial_self_review.json new file mode 100644 index 000000000..f55fa8969 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/editorial_self_review.json @@ -0,0 +1,30 @@ +{ + "schema_version": "fermatmind.big5.en_parity.editorial_self_review.v1", + "review_type": "codex_skeptical_self_review", + "status": "pending_manual_review", + "human_reviewed": false, + "editorial_approved": false, + "qa_pass": false, + "package_frozen": false, + "checks": { + "natural_independent_english": "PASS_FOR_SELF_REVIEW", + "continuous_dimension_language": "PASS_FOR_SELF_REVIEW", + "probabilistic_contextual_language": "PASS_FOR_SELF_REVIEW", + "high_low_value_neutrality": "PASS_FOR_SELF_REVIEW", + "fixed_identity_language_absent": "PASS_FOR_SELF_REVIEW", + "career_hiring_admission_claims_absent": "PASS_FOR_SELF_REVIEW", + "clinical_claims_absent": "PASS_FOR_SELF_REVIEW", + "unsupported_psychometric_numbers_absent": "PASS_FOR_SELF_REVIEW", + "share_private_fields_absent": "PASS_FOR_SELF_REVIEW", + "private_pdf_history_public_urls_absent": "PASS_FOR_SELF_REVIEW", + "analytics_internal_ids_separated": "PASS_FOR_SELF_REVIEW", + "manual_editorial_review": "PENDING" + }, + "known_limits": [ + "This producer review is not human editorial approval.", + "This producer review is not W9 independent QA.", + "No runtime selector or importer consumes this package.", + "The package has not been imported, published, promoted, or deployed." + ], + "decision": "READY_FOR_MANUAL_REVIEW_NOT_RUNTIME" +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json new file mode 100644 index 000000000..d337d7139 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json @@ -0,0 +1,65 @@ +{ + "schema_version": "fermatmind.big5.en_parity.result_content_package.v1", + "package_id": "BIG5-OCEAN-EN-PARITY-W2-RESULT-CONTENT-V1", + "scale_code": "BIG5_OCEAN", + "locale": "en", + "source_locale": "zh-CN", + "status": "pending_manual_review", + "runtime_use": "draft_review_only", + "ready_for_runtime": false, + "ready_for_production": false, + "production_use_allowed": false, + "human_reviewed": false, + "editorial_approved": false, + "qa_pass": false, + "package_frozen": false, + "source_inventory": { + "pr_id": "EN-PARITY-W2-BIG5-INVENTORY-01", + "pr_number": 1866, + "merge_sha": "897490e4baa31fe197ee50c89f0c3fae6bac408d", + "inventory_package_sha256": "0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292", + "candidate_status": "inventory_frozen" + }, + "inventory_units": [ + "free_preview", + "locked_result", + "paid_full_report", + "entitlement_levels", + "five_dimension_explanations", + "facet_subscale_explanations", + "score_range_boundary_copy", + "action_growth_advice", + "workplace_relationship_copy", + "share_public_summary", + "pdf_reader_content", + "history_account_reentry", + "result_report_cta", + "empty_error_expired_access_denied", + "mobile_desktop_consumption", + "analytics_reader_labels" + ], + "inventory_unit_count": 16, + "content_asset_count": 16, + "permissions": { + "cms_write": false, + "database_write": false, + "public_release": false, + "indexability_change": false, + "search_submission": false, + "deploy": false + }, + "authority": { + "backend_package_is_draft_authority": true, + "frontend_fallback_is_authority": false, + "runtime_selector_changed": false, + "existing_zh_cn_registry_changed": false, + "importer_changed": false, + "schema_changed": false + }, + "source_baselines": { + "fap_api_commit": "d9f1a5554bb9831a1a9dd87d76b41daf8bcac353", + "zh_cn_registry_content_tree_sha256": "870cc1dc68c19ef2660a4d086e86f0fd2181fbe2f85851c8962bc2402825aafc", + "result_page_v2_service_content_tree_sha256": "e74a6db65a5f7569f51bb8c0b59a02b6c428356536e16bd08fcf532b46ae814a" + }, + "generated_at": "2026-07-31T05:21:44Z" +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json new file mode 100644 index 000000000..3fd298db6 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -0,0 +1,17 @@ +{ + "schema_version": "fermatmind.big5.en_parity.sha256_manifest.v1", + "package_id": "BIG5-OCEAN-EN-PARITY-W2-RESULT-CONTENT-V1", + "files": [ + {"path":"package_manifest.json","sha256":"f94430ca8026e2809a5bca25210509f5e5a2d2ccf171b2f962cc79d9d2abea7a"}, + {"path":"source_ledger.json","sha256":"a6d29ee8c6dbb1841dec21b5b735c8ade800509a3b85bdd8c52fc812e7d756ba"}, + {"path":"translation_map.json","sha256":"d2cab97371f0392f647b5c057365ebf7001ecca7cd7b10cd6a172202fe4c965d"}, + {"path":"claim_boundary_report.json","sha256":"13edb5670dc2e13b91e297184fb7787e665378af9c72c0199bb44175566deab8"}, + {"path":"content_assets.jsonl","sha256":"0430020ae7c7f998479ef661d7cb761d56d2d66466a59cb1ee3fbdf641802dde"}, + {"path":"surface_coverage.json","sha256":"88e1141dc13350ab823e1815d8752ef5e110dcffaacdeace1038b5b0133ef476"}, + {"path":"duplicate_report.json","sha256":"927e21140f2835a0e959f93da9f2e758553c591121840f5ec1bb451fb2f52a26"}, + {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, + {"path":"README.md","sha256":"f23c269d5b6f17079cd1263232c7f07a17285ef4c76df86d4640ae77ea9c3d85"}, + {"path":"validate_package.php","sha256":"178c33561607027cd4e90d2884fd7c50ce634afdbbac28ac075892f81e0cc720"} + ], + "package_sha256": "cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06" +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json new file mode 100644 index 000000000..140af9ec0 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json @@ -0,0 +1,24 @@ +{ + "schema_version": "fermatmind.big5.en_parity.result_content_source_ledger.v1", + "package_id": "BIG5-OCEAN-EN-PARITY-W2-RESULT-CONTENT-V1", + "source_inventory_sha256": "0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292", + "shared_claim_map": "big5-continuous-contextual-nondiagnostic-v1", + "entries": [ + {"unit":"free_preview","translation_identity":"big5-result:free_preview:zh-CN:en","source_authority":"W2-RESULT-free_preview","asset_id":"big5.en.w2.free_preview"}, + {"unit":"locked_result","translation_identity":"big5-result:locked_result:zh-CN:en","source_authority":"W2-RESULT-locked_result","asset_id":"big5.en.w2.locked_result"}, + {"unit":"paid_full_report","translation_identity":"big5-result:paid_full_report:zh-CN:en","source_authority":"W2-RESULT-paid_full_report","asset_id":"big5.en.w2.paid_full_report"}, + {"unit":"entitlement_levels","translation_identity":"big5-result:entitlement_levels:zh-CN:en","source_authority":"W2-RESULT-entitlement_levels","asset_id":"big5.en.w2.entitlement_levels"}, + {"unit":"five_dimension_explanations","translation_identity":"big5-result:five_dimension_explanations:zh-CN:en","source_authority":"W2-RESULT-five_dimension_explanations","asset_id":"big5.en.w2.five_dimension_explanations"}, + {"unit":"facet_subscale_explanations","translation_identity":"big5-result:facet_subscale_explanations:zh-CN:en","source_authority":"W2-RESULT-facet_subscale_explanations","asset_id":"big5.en.w2.facet_subscale_explanations"}, + {"unit":"score_range_boundary_copy","translation_identity":"big5-result:score_range_boundary_copy:zh-CN:en","source_authority":"W2-RESULT-score_range_boundary_copy","asset_id":"big5.en.w2.score_range_boundary_copy"}, + {"unit":"action_growth_advice","translation_identity":"big5-result:action_growth_advice:zh-CN:en","source_authority":"W2-RESULT-action_growth_advice","asset_id":"big5.en.w2.action_growth_advice"}, + {"unit":"workplace_relationship_copy","translation_identity":"big5-result:workplace_relationship_copy:zh-CN:en","source_authority":"W2-RESULT-workplace_relationship_copy","asset_id":"big5.en.w2.workplace_relationship_copy"}, + {"unit":"share_public_summary","translation_identity":"big5-result:share_public_summary:zh-CN:en","source_authority":"W2-RESULT-share_public_summary","asset_id":"big5.en.w2.share_public_summary"}, + {"unit":"pdf_reader_content","translation_identity":"big5-result:pdf_reader_content:zh-CN:en","source_authority":"W2-RESULT-pdf_reader_content","asset_id":"big5.en.w2.pdf_reader_content"}, + {"unit":"history_account_reentry","translation_identity":"big5-result:history_account_reentry:zh-CN:en","source_authority":"W2-RESULT-history_account_reentry","asset_id":"big5.en.w2.history_account_reentry"}, + {"unit":"result_report_cta","translation_identity":"big5-result:result_report_cta:zh-CN:en","source_authority":"W2-RESULT-result_report_cta","asset_id":"big5.en.w2.result_report_cta"}, + {"unit":"empty_error_expired_access_denied","translation_identity":"big5-result:empty_error_expired_access_denied:zh-CN:en","source_authority":"W2-RESULT-empty_error_expired_access_denied","asset_id":"big5.en.w2.empty_error_expired_access_denied"}, + {"unit":"mobile_desktop_consumption","translation_identity":"big5-result:mobile_desktop_consumption:zh-CN:en","source_authority":"W2-RESULT-mobile_desktop_consumption","asset_id":"big5.en.w2.mobile_desktop_consumption"}, + {"unit":"analytics_reader_labels","translation_identity":"big5-result:analytics_reader_labels:zh-CN:en","source_authority":"W2-RESULT-analytics_reader_labels","asset_id":"big5.en.w2.analytics_reader_labels","classification":"reader_copy_only","internal_metric_ids":[]} + ] +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json new file mode 100644 index 000000000..613de4698 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json @@ -0,0 +1,32 @@ +{ + "schema_version": "fermatmind.big5.en_parity.surface_coverage.v1", + "expected_unit_count": 16, + "covered_unit_count": 16, + "missing_units": [], + "duplicate_units": [], + "coverage": [ + {"unit":"free_preview","asset_id":"big5.en.w2.free_preview","covered":true}, + {"unit":"locked_result","asset_id":"big5.en.w2.locked_result","covered":true}, + {"unit":"paid_full_report","asset_id":"big5.en.w2.paid_full_report","covered":true}, + {"unit":"entitlement_levels","asset_id":"big5.en.w2.entitlement_levels","covered":true}, + {"unit":"five_dimension_explanations","asset_id":"big5.en.w2.five_dimension_explanations","covered":true}, + {"unit":"facet_subscale_explanations","asset_id":"big5.en.w2.facet_subscale_explanations","covered":true}, + {"unit":"score_range_boundary_copy","asset_id":"big5.en.w2.score_range_boundary_copy","covered":true}, + {"unit":"action_growth_advice","asset_id":"big5.en.w2.action_growth_advice","covered":true}, + {"unit":"workplace_relationship_copy","asset_id":"big5.en.w2.workplace_relationship_copy","covered":true}, + {"unit":"share_public_summary","asset_id":"big5.en.w2.share_public_summary","covered":true}, + {"unit":"pdf_reader_content","asset_id":"big5.en.w2.pdf_reader_content","covered":true}, + {"unit":"history_account_reentry","asset_id":"big5.en.w2.history_account_reentry","covered":true}, + {"unit":"result_report_cta","asset_id":"big5.en.w2.result_report_cta","covered":true}, + {"unit":"empty_error_expired_access_denied","asset_id":"big5.en.w2.empty_error_expired_access_denied","covered":true}, + {"unit":"mobile_desktop_consumption","asset_id":"big5.en.w2.mobile_desktop_consumption","covered":true}, + {"unit":"analytics_reader_labels","asset_id":"big5.en.w2.analytics_reader_labels","covered":true} + ], + "state_coverage": { + "empty": true, + "error": true, + "expired": true, + "access_denied": true + }, + "decision": "PASS_FOR_DRAFT_REVIEW" +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/translation_map.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/translation_map.json new file mode 100644 index 000000000..a425415f8 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/translation_map.json @@ -0,0 +1,30 @@ +{ + "schema_version": "fermatmind.big5.en_parity.result_content_translation_map.v1", + "source_locale": "zh-CN", + "target_locale": "en", + "claim_map": "big5-continuous-contextual-nondiagnostic-v1", + "mappings": [ + {"unit":"free_preview","identity":"big5-result:free_preview:zh-CN:en"}, + {"unit":"locked_result","identity":"big5-result:locked_result:zh-CN:en"}, + {"unit":"paid_full_report","identity":"big5-result:paid_full_report:zh-CN:en"}, + {"unit":"entitlement_levels","identity":"big5-result:entitlement_levels:zh-CN:en"}, + {"unit":"five_dimension_explanations","identity":"big5-result:five_dimension_explanations:zh-CN:en"}, + {"unit":"facet_subscale_explanations","identity":"big5-result:facet_subscale_explanations:zh-CN:en"}, + {"unit":"score_range_boundary_copy","identity":"big5-result:score_range_boundary_copy:zh-CN:en"}, + {"unit":"action_growth_advice","identity":"big5-result:action_growth_advice:zh-CN:en"}, + {"unit":"workplace_relationship_copy","identity":"big5-result:workplace_relationship_copy:zh-CN:en"}, + {"unit":"share_public_summary","identity":"big5-result:share_public_summary:zh-CN:en"}, + {"unit":"pdf_reader_content","identity":"big5-result:pdf_reader_content:zh-CN:en"}, + {"unit":"history_account_reentry","identity":"big5-result:history_account_reentry:zh-CN:en"}, + {"unit":"result_report_cta","identity":"big5-result:result_report_cta:zh-CN:en"}, + {"unit":"empty_error_expired_access_denied","identity":"big5-result:empty_error_expired_access_denied:zh-CN:en"}, + {"unit":"mobile_desktop_consumption","identity":"big5-result:mobile_desktop_consumption:zh-CN:en"}, + {"unit":"analytics_reader_labels","identity":"big5-result:analytics_reader_labels:zh-CN:en"} + ], + "translation_policy": { + "mechanical_translation": false, + "natural_independent_english": true, + "same_claim_boundary": true, + "human_review_required": true + } +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php new file mode 100644 index 000000000..359702db7 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php @@ -0,0 +1,135 @@ + 'pending_manual_review', + 'runtime_use' => 'draft_review_only', + 'ready_for_runtime' => false, + 'ready_for_production' => false, + 'production_use_allowed' => false, + ] as $field => $expected) { + if (($asset[$field] ?? null) !== $expected) { + throw new RuntimeException("Invalid {$field} for {$asset['asset_id']}"); + } + } +} + +$privatePatterns = [ + '/"raw_score"\s*:\s*(?!false|null)/i', + '/"score_vector"\s*:\s*(?!false|null)/i', + '/"percentile"\s*:\s*(?!false|null)/i', + '/"attempt_id"\s*:\s*(?!false|null)/i', + '/"report_token"\s*:\s*(?!false|null)/i', + '/https?:\/\/\S+/i', +]; +foreach ($privatePatterns as $pattern) { + if (preg_match($pattern, $encodedAssets) === 1) { + throw new RuntimeException("Private-field or public-URL leakage detected: {$pattern}"); + } +} + +$permissions = $manifest['permissions'] ?? []; +foreach (['cms_write', 'database_write', 'public_release', 'indexability_change', 'search_submission', 'deploy'] as $permission) { + if (($permissions[$permission] ?? null) !== false) { + throw new RuntimeException("Permission must remain false: {$permission}"); + } +} + +$shaManifest = $decode($root.'/sha256_manifest.json'); +$canonical = []; +foreach ($shaManifest['files'] ?? [] as $file) { + $path = $root.'/'.$file['path']; + $actual = hash_file('sha256', $path); + if (! hash_equals((string) $file['sha256'], $actual)) { + throw new RuntimeException("SHA mismatch for {$file['path']}"); + } + $canonical[] = $file['path'].':'.$actual; +} + +$packageSha = hash('sha256', implode("\n", $canonical)); +if (! hash_equals((string) ($shaManifest['package_sha256'] ?? ''), $packageSha)) { + throw new RuntimeException('Package SHA mismatch.'); +} + +echo json_encode([ + 'ok' => true, + 'unit_count' => count($units), + 'asset_count' => count($assets), + 'package_sha256' => $packageSha, + 'runtime_use' => 'draft_review_only', +], JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR).PHP_EOL; diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md new file mode 100644 index 000000000..c157f4429 --- /dev/null +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -0,0 +1,42 @@ +# Big Five W2 English Result Assets + +## Outcome + +`EN-PARITY-W2-BIG5-RESULT-ASSETS-01` produces one backend draft-review-only package covering all 16 frozen result/report/share/PDF/history inventory units from fap-web PR 1866. + +The package contains natural English reader copy for previews, locked and full reports, entitlements, five dimensions, 30 facets, score-range boundaries, practical reflection, workplace and relationship context, public-safe sharing, private PDF/history use, calls to action, fail-closed states, cross-device reading, and reader-facing analytics labels. + +## Exact lineage + +- Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` +- Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` +- Result content package SHA-256: `cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06` + +## Boundaries + +- Every asset is `pending_manual_review`. +- `runtime_use` is `draft_review_only`. +- No asset is ready for runtime or production. +- No CMS, database, publish, indexability, search, or deploy permission is granted. +- Share copy contains no scores, score vectors, percentiles, private URLs, attempt IDs, or report tokens. +- PDF and history copy remain private-reader content and expose no public URL. +- Analytics reader labels contain no internal metric IDs or personal result fields. +- High and low ranges are value-neutral; dimensions are continuous and contextual. +- The copy does not diagnose, rank ability or character, make hiring/admission decisions, prescribe careers, or guarantee outcomes. + +## Review state + +Codex performed a skeptical producer self-review. That review is not human editorial approval and is not W9 independent QA. The package is not frozen, imported, promoted, published, or deployed. + +## Repository rule impact + +This PR adds a draft-only backend content package and its validation evidence. It does not change the existing zh-CN registry, runtime selector, importer, schema, API routes, CMS authority, or frontend no-fallback boundary. + +## Validation + +```bash +php backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php +php -l backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +cd backend && php artisan test tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php --no-ansi +cd backend && composer test:content +``` diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json new file mode 100644 index 000000000..c1094ce13 --- /dev/null +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -0,0 +1,57 @@ +{ + "schema_version": "en-parity-w2-big-five-result-assets.v1", + "pr_id": "EN-PARITY-W2-BIG5-RESULT-ASSETS-01", + "title": "Big Five W2 English result assets", + "source_inventory": { + "pr_number": 1866, + "merge_sha": "897490e4baa31fe197ee50c89f0c3fae6bac408d", + "package_sha256": "0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292", + "status": "inventory_frozen" + }, + "output_package": { + "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", + "package_sha256": "cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06", + "inventory_unit_count": 16, + "covered_unit_count": 16, + "asset_group_count": 16, + "locale": "en", + "status": "pending_manual_review", + "runtime_use": "draft_review_only" + }, + "validation": { + "exact_units": "PASS", + "unique_traceability": "PASS", + "english_complete": "PASS", + "cjk_leakage": 0, + "private_field_leakage": 0, + "forbidden_claim_findings": 0, + "fixed_type_findings": 0, + "share_safe": "PASS", + "entitlement_separated": "PASS", + "empty_error_expired_access_denied": "PASS", + "analytics_internal_ids_separated": "PASS", + "deterministic_sha": "PASS" + }, + "permissions": { + "ready_for_runtime": false, + "ready_for_production": false, + "production_use_allowed": false, + "cms_write": false, + "database_write": false, + "public_release": false, + "indexability_change": false, + "search_submission": false, + "deploy": false + }, + "review": { + "codex_skeptical_self_review": true, + "human_reviewed": false, + "editorial_approved": false, + "qa_pass": false, + "package_frozen": false, + "w9_independent_qa": "not_performed" + }, + "repository_rule_impact": "Draft-only backend content package. Existing backend authority, zh-CN registry, runtime selector, importer, schema, public API, and frontend no-fallback rules are unchanged.", + "decision": "READY_FOR_MANUAL_REVIEW_NOT_RUNTIME", + "generated_at": "2026-07-31T05:21:44Z" +} diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php new file mode 100644 index 000000000..0c61218d0 --- /dev/null +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -0,0 +1,228 @@ +loadJson('package_manifest.json'); + $assets = $this->assets(); + $ledger = $this->loadJson('source_ledger.json'); + $translationMap = $this->loadJson('translation_map.json'); + $coverage = $this->loadJson('surface_coverage.json'); + + $this->assertSame(self::UNITS, $manifest['inventory_units']); + $this->assertSame(16, $manifest['inventory_unit_count']); + $this->assertCount(16, $assets); + $this->assertSame(self::UNITS, array_column($assets, 'unit')); + $this->assertCount(16, array_unique(array_column($assets, 'unit'))); + $this->assertCount(16, array_unique(array_column($assets, 'asset_id'))); + $this->assertSame(self::UNITS, array_column($ledger['entries'], 'unit')); + $this->assertSame(self::UNITS, array_column($translationMap['mappings'], 'unit')); + $this->assertSame(16, $coverage['covered_unit_count']); + $this->assertSame([], $coverage['missing_units']); + $this->assertSame([], $coverage['duplicate_units']); + } + + #[Test] + public function it_keeps_every_asset_draft_only_and_every_permission_false(): void + { + $manifest = $this->loadJson('package_manifest.json'); + + foreach ($this->assets() as $asset) { + $this->assertSame('en', $asset['locale']); + $this->assertSame('pending_manual_review', $asset['status']); + $this->assertSame('draft_review_only', $asset['runtime_use']); + $this->assertFalse($asset['ready_for_runtime']); + $this->assertFalse($asset['ready_for_production']); + $this->assertFalse($asset['production_use_allowed']); + } + + $this->assertSame('pending_manual_review', $manifest['status']); + $this->assertSame('draft_review_only', $manifest['runtime_use']); + $this->assertFalse($manifest['ready_for_runtime']); + $this->assertFalse($manifest['ready_for_production']); + $this->assertFalse($manifest['production_use_allowed']); + $this->assertFalse($manifest['human_reviewed']); + $this->assertFalse($manifest['editorial_approved']); + $this->assertFalse($manifest['qa_pass']); + $this->assertFalse($manifest['package_frozen']); + foreach ($manifest['permissions'] as $allowed) { + $this->assertFalse($allowed); + } + } + + #[Test] + public function it_blocks_cjk_private_fields_public_urls_and_forbidden_claims(): void + { + $encoded = json_encode($this->assets(), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR); + + $this->assertDoesNotMatchRegularExpression('/[\x{3400}-\x{9FFF}\x{F900}-\x{FAFF}]/u', $encoded); + $this->assertDoesNotMatchRegularExpression('/https?:\/\/\S+/i', $encoded); + + foreach ([ + 'guaranteed career', + 'perfect career', + 'hiring fit', + 'admission decision', + 'clinical diagnosis', + 'treatment plan', + 'intelligence score', + 'moral ranking', + 'salary guarantee', + 'success guarantee', + 'relationship guarantee', + ] as $claim) { + $this->assertStringNotContainsString($claim, strtolower($encoded)); + } + + foreach (['raw_score', 'score_vector', 'percentile', 'attempt_id', 'report_token', 'private_url'] as $privateField) { + $this->assertStringNotContainsString('"'.$privateField.'":', $encoded); + } + } + + #[Test] + public function it_enforces_share_private_reader_entitlement_and_failure_boundaries(): void + { + $byUnit = []; + foreach ($this->assets() as $asset) { + $byUnit[$asset['unit']] = $asset['content']; + } + + $this->assertSame( + ['title', 'summary', 'privacy_note'], + $byUnit['share_public_summary']['allowed_fields'] + ); + $this->assertFalse($byUnit['pdf_reader_content']['public_url_allowed']); + $this->assertFalse($byUnit['pdf_reader_content']['indexable']); + $this->assertCount(3, $byUnit['entitlement_levels']['levels']); + $this->assertSame( + ['empty', 'error', 'expired', 'access_denied'], + array_column($byUnit['empty_error_expired_access_denied']['states'], 'key') + ); + $this->assertTrue($byUnit['empty_error_expired_access_denied']['fail_closed']); + $this->assertSame([], $byUnit['analytics_reader_labels']['internal_metric_ids']); + $this->assertSame([], $byUnit['analytics_reader_labels']['personal_result_fields']); + $this->assertCount(5, $byUnit['five_dimension_explanations']['dimensions']); + $this->assertCount(30, $byUnit['facet_subscale_explanations']['facets']); + } + + #[Test] + public function it_has_a_deterministic_byte_exact_sha_manifest(): void + { + $shaManifest = $this->loadJson('sha256_manifest.json'); + $canonical = []; + + foreach ($shaManifest['files'] as $file) { + $actual = hash_file('sha256', $this->path($file['path'])); + $this->assertSame($file['sha256'], $actual, $file['path']); + $canonical[] = $file['path'].':'.$actual; + } + + $this->assertSame( + $shaManifest['package_sha256'], + hash('sha256', implode("\n", $canonical)) + ); + $this->assertSame( + 'cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06', + $shaManifest['package_sha256'] + ); + } + + #[Test] + public function it_pins_unchanged_zh_registry_and_runtime_selector_baselines(): void + { + $manifest = $this->loadJson('package_manifest.json'); + $this->assertSame( + $manifest['source_baselines']['zh_cn_registry_content_tree_sha256'], + $this->contentTreeSha(base_path('content_packs/BIG5_OCEAN/v2/registry')) + ); + $this->assertSame( + $manifest['source_baselines']['result_page_v2_service_content_tree_sha256'], + $this->contentTreeSha(base_path('app/Services/BigFive/ResultPageV2')) + ); + $this->assertFalse($manifest['authority']['existing_zh_cn_registry_changed']); + $this->assertFalse($manifest['authority']['runtime_selector_changed']); + $this->assertFalse($manifest['authority']['importer_changed']); + $this->assertFalse($manifest['authority']['schema_changed']); + } + + /** + * @return array + */ + private function loadJson(string $file): array + { + return json_decode( + (string) file_get_contents($this->path($file)), + true, + 512, + JSON_THROW_ON_ERROR + ); + } + + /** + * @return list> + */ + private function assets(): array + { + $assets = []; + foreach (file($this->path('content_assets.jsonl'), FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ?: [] as $line) { + $asset = json_decode($line, true, 512, JSON_THROW_ON_ERROR); + $this->assertIsArray($asset); + $assets[] = $asset; + } + + return $assets; + } + + private function path(string $file): string + { + return base_path(self::PACKAGE.'/'.$file); + } + + private function contentTreeSha(string $root): string + { + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($root, \FilesystemIterator::SKIP_DOTS) + ); + $rows = []; + foreach ($iterator as $file) { + if (! $file->isFile()) { + continue; + } + $relative = substr($file->getPathname(), strlen($root) + 1); + $rows[] = $relative.':'.hash_file('sha256', $file->getPathname()); + } + sort($rows, SORT_STRING); + + return hash('sha256', implode("\n", $rows)); + } +} diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 69c731e8a..05cb3c6a5 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102395,5 +102395,67 @@ } ], "updated_at": "2026-07-31T04:52:07Z" + }, + "EN-PARITY-W2-BIG5-RESULT-ASSETS-01": { + "id": "EN-PARITY-W2-BIG5-RESULT-ASSETS-01", + "repo": "fap-api", + "base": "main", + "branch": "codex/en-parity-w2-big5-result-assets-01", + "title": "EN-PARITY-W2-BIG5-RESULT-ASSETS-01: produce reviewed Big Five English result assets", + "status": "local_verified", + "depends_on": [ + "EN-PARITY-W2-BIG5-INVENTORY-01" + ], + "commit_sha": null, + "pr_url": null, + "checks": { + "dependency": { + "status": "pass", + "evidence": "fap-web PR 1866 merged as 897490e4baa31fe197ee50c89f0c3fae6bac408d. Its immutable 118-row inventory package SHA is 0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292; post-merge branch cleanup and local main synchronization passed." + }, + "content_package_contract": { + "status": "pass", + "evidence": "The existing Big Five English draft catalog supports draft-only reader label groups. The operator-frozen analytics_reader_labels identity is represented as reader copy with empty internal_metric_ids and personal_result_fields; no selector, runtime, importer, or schema change is required." + }, + "local_validation": { + "status": "pass", + "evidence": "Package validator passes twice byte-identically with SHA cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06. Focused PHPUnit passes 6 tests / 233 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + }, + "github_required_checks": { + "status": "pending", + "evidence": "PR not opened." + } + }, + "scope_validation": { + "allowed_paths_only": true, + "local_validation_passed": false, + "github_checks_green": false, + "post_merge_revalidated": false + }, + "failure_reason": null, + "merged_at": null, + "remote_branch_deleted": false, + "local_cleanup_executed": false, + "production_write_execution": false, + "production_read_only_evidence": false, + "database_mutation": false, + "cms_mutation": false, + "api_runtime_change": false, + "publish_allowed": false, + "search_channel_action": false, + "deploy_allowed": false, + "transitions": [ + { + "at": "2026-07-31T05:21:44Z", + "status": "implementation_in_progress", + "note": "Started from clean fap-api main d9f1a5554bb9831a1a9dd87d76b41daf8bcac353 after dependency PR 1866 merged and post-merge revalidated. Contract preflight proved all sixteen identities, including analytics reader labels, can be represented in a draft-only package without schema, selector, runtime, or importer changes." + }, + { + "at": "2026-07-31T05:34:22Z", + "status": "local_verified", + "note": "Produced exactly sixteen traceable English draft asset groups with 5 dimension and 30 facet explanations, value-neutral range copy, share/private-reader boundaries, fail-closed states, cross-device copy, and analytics reader labels separated from internal IDs. Deterministic package SHA is cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06. All required local package, focused, content-suite, formatting, parsing, scan, diff, and scope checks pass; no write or runtime authority changed." + } + ], + "updated_at": "2026-07-31T05:34:22Z" } } diff --git a/docs/codex/pr-train.yaml b/docs/codex/pr-train.yaml index 4e9d91288..39a9de0e8 100644 --- a/docs/codex/pr-train.yaml +++ b/docs/codex/pr-train.yaml @@ -111,6 +111,59 @@ prs: deploy_allowed: false content_authority: backend + - id: EN-PARITY-W2-BIG5-RESULT-ASSETS-01 + repo: fap-api + base: main + branch: codex/en-parity-w2-big5-result-assets-01 + title: "EN-PARITY-W2-BIG5-RESULT-ASSETS-01: produce reviewed Big Five English result assets" + status: local_verified + depends_on: + - EN-PARITY-W2-BIG5-INVENTORY-01 + train_scope: en_parity_w2_big5_result_assets + scope: + - Produce a backend-authoritative English draft-review-only content package for the sixteen frozen Big Five result/report/share/PDF/history inventory units. + - Preserve continuous, contextual, probabilistic, value-neutral Big Five language and private-reader/share-safe boundaries. + - Record deterministic package evidence and focused contract coverage without activating any runtime consumer. + allowed_paths: + - backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/** + - backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json + - backend/docs/seo/en-parity-w2-big-five-result-assets.md + - backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php + - docs/codex/pr-train.yaml + - docs/codex/pr-train-state.json + - generated/pr-train-sidecar-issues/sidecar_issues.md + - generated/pr-train-sidecar-issues/sidecar_issues.json + do_not: + - Modify routes, migrations, auth middleware, ResultPageV2 runtime services, selectors, importers, publishers, schemas, production commands, public APIs, or fap-web. + - Write CMS or database state, import, publish, promote, change indexability, mutate sitemap or llms, submit search URLs, or deploy. + - Claim human review, editorial approval, W9 independent QA, qa_pass, package_frozen, runtime readiness, or production readiness. + validation: + - php -l backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php + - php -l backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php + - php backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php + - cd backend && php artisan test tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php --no-ansi + - cd backend && composer test:content + - parse all package JSON and JSONL + - recompute every SHA manifest entry and aggregate package SHA + - scan for CJK, private fields, forbidden claims, fixed-type language, and public URLs + - ruby -e "require 'yaml'; YAML.load_file('docs/codex/pr-train.yaml'); puts 'yaml ok'" + - python3 -m json.tool docs/codex/pr-train-state.json >/dev/null + - git diff --check + - git diff --cached --check + - exact changed-file scope validation + stop_if_changed_files_outside_scope: true + merge_policy: { github_checks_required: true, squash: true, auto_merge: true } + production_write_execution: false + production_read_only_evidence: false + database_mutation: false + cms_mutation: false + api_runtime_change: false + publish_allowed: false + search_channel_action: false + deploy_allowed: false + content_authority: backend_draft_package + repository_rule_impact: draft-only backend content assets; existing authority, runtime, selector, importer, schema, and frontend no-fallback rules remain unchanged + - id: API-UNLOCK-01 repo: fap-api base: main From 93c82696445eb79519fd39dfb369b0bdf9fd676a Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 13:36:17 +0800 Subject: [PATCH 02/20] chore(pr-train): record Big Five result asset PR --- docs/codex/pr-train-state.json | 15 ++++++++++----- docs/codex/pr-train.yaml | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 05cb3c6a5..313671d1b 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102402,12 +102402,12 @@ "base": "main", "branch": "codex/en-parity-w2-big5-result-assets-01", "title": "EN-PARITY-W2-BIG5-RESULT-ASSETS-01: produce reviewed Big Five English result assets", - "status": "local_verified", + "status": "github_checks_pending", "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": null, - "pr_url": null, + "commit_sha": "6fc25b8a8247c660f969a1709dca4236276a9496", + "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { "status": "pass", @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR not opened." + "evidence": "PR 3451 opened from implementation head 6fc25b8a8247c660f969a1709dca4236276a9496; exact-head required checks and review are pending." } }, "scope_validation": { @@ -102454,8 +102454,13 @@ "at": "2026-07-31T05:34:22Z", "status": "local_verified", "note": "Produced exactly sixteen traceable English draft asset groups with 5 dimension and 30 facet explanations, value-neutral range copy, share/private-reader boundaries, fail-closed states, cross-device copy, and analytics reader labels separated from internal IDs. Deterministic package SHA is cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06. All required local package, focused, content-suite, formatting, parsing, scan, diff, and scope checks pass; no write or runtime authority changed." + }, + { + "at": "2026-07-31T05:35:51Z", + "status": "github_checks_pending", + "note": "Committed and pushed the exact sixteen-path scope as implementation head 6fc25b8a8247c660f969a1709dca4236276a9496, then opened PR 3451. Required GitHub checks and exact-head review are pending." } ], - "updated_at": "2026-07-31T05:34:22Z" + "updated_at": "2026-07-31T05:35:51Z" } } diff --git a/docs/codex/pr-train.yaml b/docs/codex/pr-train.yaml index 39a9de0e8..179aecb0f 100644 --- a/docs/codex/pr-train.yaml +++ b/docs/codex/pr-train.yaml @@ -116,7 +116,7 @@ prs: base: main branch: codex/en-parity-w2-big5-result-assets-01 title: "EN-PARITY-W2-BIG5-RESULT-ASSETS-01: produce reviewed Big Five English result assets" - status: local_verified + status: github_checks_pending depends_on: - EN-PARITY-W2-BIG5-INVENTORY-01 train_scope: en_parity_w2_big5_result_assets From 33bcf875a896524383e7f6ba9173f7dbbaaba802 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 13:47:41 +0800 Subject: [PATCH 03/20] fix(big5): tighten W2 result asset evidence --- .../w2_result_content_v1/content_assets.jsonl | 2 +- .../package_manifest.json | 4 +- .../w2_result_content_v1/sha256_manifest.json | 6 +- .../en-parity-w2-big-five-result-assets.md | 2 +- ...n-parity-w2-big-five-result-assets.v1.json | 2 +- .../BigFiveEnglishResultAssetPackageTest.php | 60 +++++++++++++------ ...BigFiveResultPageV2CoreBodyPreviewTest.php | 28 +++++++++ docs/codex/pr-train-state.json | 11 +++- docs/codex/pr-train.yaml | 1 + 9 files changed, 87 insertions(+), 29 deletions(-) diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl index 4c410da35..5904c4b33 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl @@ -3,7 +3,7 @@ {"asset_id":"big5.en.w2.paid_full_report","unit":"paid_full_report","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your full Big Five report","intro":"Read the report as a set of working hypotheses. Each dimension describes a continuum, and the pattern may appear differently across work, relationships, stress, and unfamiliar situations.","section_intro":"Explore the five dimensions, the facets within them, and actions you may want to test. No single score defines your ability, character, or future.","closing":"Keep what is useful, question what does not fit, and revisit the result alongside real examples from your life."}} {"asset_id":"big5.en.w2.entitlement_levels","unit":"entitlement_levels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"levels":[{"key":"preview","label":"Preview","description":"A short, private snapshot of selected tendencies."},{"key":"core","label":"Core result","description":"All five dimension ranges with concise explanations."},{"key":"full","label":"Full report","description":"Dimension and facet context, reflection prompts, and practical action ideas."}],"boundary":"Access levels describe available content only. They do not indicate result quality, certainty, or personal potential."}} {"asset_id":"big5.en.w2.five_dimension_explanations","unit":"five_dimension_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"dimensions":[{"code":"O","title":"Openness to Experience","body":"This dimension reflects how readily you may explore unfamiliar ideas, perspectives, aesthetics, and ways of doing things. Different contexts can call for curiosity, continuity, or a blend of both."},{"code":"C","title":"Conscientiousness","body":"This dimension reflects how you may organize effort, follow plans, and manage responsibilities. Structure can support reliability, while flexibility can help when priorities change."},{"code":"E","title":"Extraversion","body":"This dimension reflects how you may engage with social stimulation, activity, and outward expression. Quiet and energetic settings can each support different kinds of contribution."},{"code":"A","title":"Agreeableness","body":"This dimension reflects how you may balance cooperation, trust, candor, and personal boundaries. Effective interaction can involve both consideration and clear disagreement."},{"code":"N","title":"Emotional Sensitivity","body":"This dimension reflects how readily you may notice stress, threat, or emotional shifts. Sensitivity can provide early signals, while steadiness can support recovery; neither range determines resilience or worth."}]}} -{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Awareness","description":"Attention to emotional nuance in yourself and in situations."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Low Mood Sensitivity","description":"Readiness to notice discouragement, loss, or reduced energy."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Impulse Pressure","description":"Strength of immediate urges when emotion or reward is present."},{"code":"N6","label":"Stress Vulnerability","description":"Likelihood of feeling overloaded when demands accumulate."}]}} +{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Awareness","description":"Attention to emotional nuance in yourself and in situations."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Low Mood Sensitivity","description":"Readiness to notice discouragement, loss, or reduced energy."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Stress Vulnerability","description":"Likelihood of feeling overloaded when demands accumulate."}]}} {"asset_id":"big5.en.w2.score_range_boundary_copy","unit":"score_range_boundary_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Ranges describe relative tendencies in this response set, not grades or ability levels.","ranges":[{"key":"lower","label":"Lower range","description":"This tendency may be less prominent or may appear in narrower situations. Lower does not mean worse."},{"key":"middle","label":"Middle range","description":"You may shift between both sides of the dimension depending on context, role, or current demands."},{"key":"higher","label":"Higher range","description":"This tendency may appear more readily across situations. Higher does not mean better."}],"boundary":"Small differences near a range boundary should not be treated as a sharp change in personality."}} {"asset_id":"big5.en.w2.action_growth_advice","unit":"action_growth_advice","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Turn the result into small experiments","actions":[{"context":"awareness","prompt":"Choose one tendency and write down two recent situations where it helped and one where it created friction."},{"context":"flexibility","prompt":"Try a low-risk behavior from the other side of the dimension and observe what changes."},{"context":"environment","prompt":"Adjust one cue, routine, or boundary so the behavior you want is easier to repeat."},{"context":"review","prompt":"Revisit the experiment after a week and keep only what was useful in that context."}],"boundary":"These are reflection ideas, not treatment, performance, or career prescriptions."}} {"asset_id":"big5.en.w2.workplace_relationship_copy","unit":"workplace_relationship_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"workplace":{"title":"At work","body":"Your tendencies may shape how you plan, communicate, respond to change, and manage stimulation. Role expectations and team norms can strengthen or soften the pattern.","prompt":"Which working conditions help you contribute consistently, and which require deliberate adjustment?"},"relationships":{"title":"In relationships","body":"The same tendency may be helpful in one interaction and difficult in another. Consider communication habits, boundaries, repair, and the other person's context rather than ranking one style above another.","prompt":"What helps you stay clear and considerate when your preferences differ?"},"boundary":"This content does not predict job performance, determine employment decisions, rate relationship quality, or guarantee outcomes."}} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json index d337d7139..6acd191b9 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json @@ -58,8 +58,8 @@ }, "source_baselines": { "fap_api_commit": "d9f1a5554bb9831a1a9dd87d76b41daf8bcac353", - "zh_cn_registry_content_tree_sha256": "870cc1dc68c19ef2660a4d086e86f0fd2181fbe2f85851c8962bc2402825aafc", - "result_page_v2_service_content_tree_sha256": "e74a6db65a5f7569f51bb8c0b59a02b6c428356536e16bd08fcf532b46ae814a" + "zh_cn_registry_git_tree_oid": "0c0c42c20ee1a78164a91093d69c7d616edfa8a7", + "result_page_v2_service_git_tree_oid": "bcf1cdb47da2596e252e4940ccc6cac368218e5f" }, "generated_at": "2026-07-31T05:21:44Z" } diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json index 3fd298db6..a1c91c743 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -2,16 +2,16 @@ "schema_version": "fermatmind.big5.en_parity.sha256_manifest.v1", "package_id": "BIG5-OCEAN-EN-PARITY-W2-RESULT-CONTENT-V1", "files": [ - {"path":"package_manifest.json","sha256":"f94430ca8026e2809a5bca25210509f5e5a2d2ccf171b2f962cc79d9d2abea7a"}, + {"path":"package_manifest.json","sha256":"1f7af6c284d3034380bf23718b7f00f926e0e3daa7af34e792616e37bc5f0ade"}, {"path":"source_ledger.json","sha256":"a6d29ee8c6dbb1841dec21b5b735c8ade800509a3b85bdd8c52fc812e7d756ba"}, {"path":"translation_map.json","sha256":"d2cab97371f0392f647b5c057365ebf7001ecca7cd7b10cd6a172202fe4c965d"}, {"path":"claim_boundary_report.json","sha256":"13edb5670dc2e13b91e297184fb7787e665378af9c72c0199bb44175566deab8"}, - {"path":"content_assets.jsonl","sha256":"0430020ae7c7f998479ef661d7cb761d56d2d66466a59cb1ee3fbdf641802dde"}, + {"path":"content_assets.jsonl","sha256":"86c646c231b90c86a9dcacfc7670caeec0f6e8161b5c9e59236c06975d401a72"}, {"path":"surface_coverage.json","sha256":"88e1141dc13350ab823e1815d8752ef5e110dcffaacdeace1038b5b0133ef476"}, {"path":"duplicate_report.json","sha256":"927e21140f2835a0e959f93da9f2e758553c591121840f5ec1bb451fb2f52a26"}, {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, {"path":"README.md","sha256":"f23c269d5b6f17079cd1263232c7f07a17285ef4c76df86d4640ae77ea9c3d85"}, {"path":"validate_package.php","sha256":"178c33561607027cd4e90d2884fd7c50ce634afdbbac28ac075892f81e0cc720"} ], - "package_sha256": "cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06" + "package_sha256": "42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7" } diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md index c157f4429..88d372cfa 100644 --- a/backend/docs/seo/en-parity-w2-big-five-result-assets.md +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -10,7 +10,7 @@ The package contains natural English reader copy for previews, locked and full r - Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` -- Result content package SHA-256: `cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06` +- Result content package SHA-256: `42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7` ## Boundaries diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json index c1094ce13..7bada829e 100644 --- a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -10,7 +10,7 @@ }, "output_package": { "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", - "package_sha256": "cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06", + "package_sha256": "42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7", "inventory_unit_count": 16, "covered_unit_count": 16, "asset_group_count": 16, diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php index 0c61218d0..ee2076f73 100644 --- a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -133,6 +133,13 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar $this->assertSame([], $byUnit['analytics_reader_labels']['personal_result_fields']); $this->assertCount(5, $byUnit['five_dimension_explanations']['dimensions']); $this->assertCount(30, $byUnit['facet_subscale_explanations']['facets']); + $n5 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'N5' + ))[0]; + $this->assertSame('Overload Exit Urge', $n5['label']); + $this->assertStringContainsString('when overloaded', $n5['description']); + $this->assertStringContainsString('disconnect, withdraw, or change the situation immediately', $n5['description']); } #[Test] @@ -152,7 +159,7 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void hash('sha256', implode("\n", $canonical)) ); $this->assertSame( - 'cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06', + '42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7', $shaManifest['package_sha256'] ); } @@ -161,14 +168,26 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void public function it_pins_unchanged_zh_registry_and_runtime_selector_baselines(): void { $manifest = $this->loadJson('package_manifest.json'); + $commit = $manifest['source_baselines']['fap_api_commit']; + $this->assertSame( - $manifest['source_baselines']['zh_cn_registry_content_tree_sha256'], - $this->contentTreeSha(base_path('content_packs/BIG5_OCEAN/v2/registry')) + '0c0c42c20ee1a78164a91093d69c7d616edfa8a7', + $manifest['source_baselines']['zh_cn_registry_git_tree_oid'] ); $this->assertSame( - $manifest['source_baselines']['result_page_v2_service_content_tree_sha256'], - $this->contentTreeSha(base_path('app/Services/BigFive/ResultPageV2')) + 'bcf1cdb47da2596e252e4940ccc6cac368218e5f', + $manifest['source_baselines']['result_page_v2_service_git_tree_oid'] ); + if ($this->gitCommitIsAvailable($commit)) { + $this->assertSame( + $manifest['source_baselines']['zh_cn_registry_git_tree_oid'], + $this->gitTreeOid($commit, 'backend/content_packs/BIG5_OCEAN/v2/registry') + ); + $this->assertSame( + $manifest['source_baselines']['result_page_v2_service_git_tree_oid'], + $this->gitTreeOid($commit, 'backend/app/Services/BigFive/ResultPageV2') + ); + } $this->assertFalse($manifest['authority']['existing_zh_cn_registry_changed']); $this->assertFalse($manifest['authority']['runtime_selector_changed']); $this->assertFalse($manifest['authority']['importer_changed']); @@ -208,21 +227,26 @@ private function path(string $file): string return base_path(self::PACKAGE.'/'.$file); } - private function contentTreeSha(string $root): string + private function gitCommitIsAvailable(string $commit): bool { - $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($root, \FilesystemIterator::SKIP_DOTS) + exec( + 'git -C '.escapeshellarg(dirname(base_path())). + ' cat-file -e '.escapeshellarg($commit.'^{commit}').' 2>/dev/null', + $output, + $status ); - $rows = []; - foreach ($iterator as $file) { - if (! $file->isFile()) { - continue; - } - $relative = substr($file->getPathname(), strlen($root) + 1); - $rows[] = $relative.':'.hash_file('sha256', $file->getPathname()); - } - sort($rows, SORT_STRING); - return hash('sha256', implode("\n", $rows)); + return $status === 0; + } + + private function gitTreeOid(string $commit, string $path): string + { + $command = 'git -C '.escapeshellarg(dirname(base_path())). + ' rev-parse '.escapeshellarg($commit.':'.$path); + $value = shell_exec($command); + + $this->assertNotNull($value); + + return trim((string) $value); } } diff --git a/backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php b/backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php index 5cf49464e..97814cd2e 100644 --- a/backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php +++ b/backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php @@ -6187,6 +6187,22 @@ public function test_runtime_freeze_classifier_ignores_bigfive_v2_en_parity_draf $this->assertSame([], $this->mbtiImpactingRuntimeChanges($changed, '', '')); } + public function test_runtime_freeze_classifier_ignores_w2_en_parity_result_draft_package(): void + { + $allowed = [ + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php', + ]; + $blocked = [ + 'backend/content_packs/BIG5_OCEAN/v2/registry/shared/trait_labels.json', + 'backend/app/Services/BigFive/ResultPageV2/BigFiveResultPageV2Service.php', + ]; + + $this->assertSame([], $this->mbtiImpactingRuntimeChanges($allowed, '', '')); + $this->assertSame($blocked, $this->mbtiImpactingRuntimeChanges($blocked, '', '')); + } + public function test_runtime_freeze_classifier_ignores_personality_public_asset_contract_changes(): void { $changed = [ @@ -7997,6 +8013,10 @@ private function mbtiImpactingRuntimeChanges( continue; } + if ($this->isBigFiveW2EnParityResultDraftPackageFile($file)) { + continue; + } + if ($this->isBigFiveEnglishDraftInventoryFile($file)) { continue; } @@ -11895,6 +11915,14 @@ private function isBigFiveV2EnParityDraftCatalogFile(string $file): bool return $file === 'backend/content_packs/BIG5_OCEAN/v2/drafts/en_parity/result_page_v2_en_asset_catalog_draft.v1.json'; } + private function isBigFiveW2EnParityResultDraftPackageFile(string $file): bool + { + return str_starts_with( + $file, + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/' + ); + } + private function isBigFiveEnglishDraftInventoryFile(string $file): bool { return in_array($file, [ diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 313671d1b..a2038c80d 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -85849,7 +85849,7 @@ }, "scope_validation": { "allowed_paths_only": true, - "local_validation_passed": false, + "local_validation_passed": true, "github_checks_green": null, "post_merge_revalidated": false }, @@ -102419,7 +102419,7 @@ }, "local_validation": { "status": "pass", - "evidence": "Package validator passes twice byte-identically with SHA cda743f52cebaf753b8d0f2f234dd893e88f5d630ea6cc4e7a5f5b32faefda06. Focused PHPUnit passes 6 tests / 233 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + "evidence": "Package validator passes twice byte-identically with SHA 42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7. Focused package PHPUnit passes 6 tests / 240 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { "status": "pending", @@ -102459,8 +102459,13 @@ "at": "2026-07-31T05:35:51Z", "status": "github_checks_pending", "note": "Committed and pushed the exact sixteen-path scope as implementation head 6fc25b8a8247c660f969a1709dca4236276a9496, then opened PR 3451. Required GitHub checks and exact-head review are pending." + }, + { + "at": "2026-07-31T05:47:03Z", + "status": "review_fix_local_checks_passed", + "note": "Inspected CI run 30607268537 verify-bigfive before editing: 1658 tests passed and the only failure was the runtime-freeze classifier treating the new draft package directory as runtime-impacting. Added an exact package-prefix exception plus positive/negative regression and declared the classifier test in scope. Exact-head review findings are also repaired: local_validation_passed is true, baseline tree OIDs resolve from pinned commit d9f1a5554bb9831a1a9dd87d76b41daf8bcac353 rather than the live checkout, and N5 now preserves the source facet's overload-driven disconnect/withdraw/change-state meaning. Package SHA rebuilt as 42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7; all focused, content-suite, Pint, parser, scan, diff, and scope checks pass." } ], - "updated_at": "2026-07-31T05:35:51Z" + "updated_at": "2026-07-31T05:47:03Z" } } diff --git a/docs/codex/pr-train.yaml b/docs/codex/pr-train.yaml index 179aecb0f..756b7580a 100644 --- a/docs/codex/pr-train.yaml +++ b/docs/codex/pr-train.yaml @@ -129,6 +129,7 @@ prs: - backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json - backend/docs/seo/en-parity-w2-big-five-result-assets.md - backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php + - backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php - docs/codex/pr-train.yaml - docs/codex/pr-train-state.json - generated/pr-train-sidecar-issues/sidecar_issues.md From bf7bf368fa7a4fe300be2bd5d7d24363d3f1a205 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 13:48:09 +0800 Subject: [PATCH 04/20] chore(pr-train): record W2 result asset repair head --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index a2038c80d..257073189 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "6fc25b8a8247c660f969a1709dca4236276a9496", + "commit_sha": "33bcf875a896524383e7f6ba9173f7dbbaaba802", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 opened from implementation head 6fc25b8a8247c660f969a1709dca4236276a9496; exact-head required checks and review are pending." + "evidence": "PR 3451 repair head 33bcf875a896524383e7f6ba9173f7dbbaaba802 requires fresh exact-head checks and review after scoped CI and semantic repairs." } }, "scope_validation": { From 4850a5706e6c860495a46d29bea87c8442df789e Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 13:59:25 +0800 Subject: [PATCH 05/20] fix(big-five): preserve N3 result asset semantics --- .../w2_result_content_v1/content_assets.jsonl | 2 +- .../w2_result_content_v1/sha256_manifest.json | 4 ++-- .../docs/seo/en-parity-w2-big-five-result-assets.md | 2 +- .../en-parity-w2-big-five-result-assets.v1.json | 2 +- .../BigFiveEnglishResultAssetPackageTest.php | 10 +++++++++- docs/codex/pr-train-state.json | 13 +++++++++---- 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl index 5904c4b33..9a84869b6 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl @@ -3,7 +3,7 @@ {"asset_id":"big5.en.w2.paid_full_report","unit":"paid_full_report","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your full Big Five report","intro":"Read the report as a set of working hypotheses. Each dimension describes a continuum, and the pattern may appear differently across work, relationships, stress, and unfamiliar situations.","section_intro":"Explore the five dimensions, the facets within them, and actions you may want to test. No single score defines your ability, character, or future.","closing":"Keep what is useful, question what does not fit, and revisit the result alongside real examples from your life."}} {"asset_id":"big5.en.w2.entitlement_levels","unit":"entitlement_levels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"levels":[{"key":"preview","label":"Preview","description":"A short, private snapshot of selected tendencies."},{"key":"core","label":"Core result","description":"All five dimension ranges with concise explanations."},{"key":"full","label":"Full report","description":"Dimension and facet context, reflection prompts, and practical action ideas."}],"boundary":"Access levels describe available content only. They do not indicate result quality, certainty, or personal potential."}} {"asset_id":"big5.en.w2.five_dimension_explanations","unit":"five_dimension_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"dimensions":[{"code":"O","title":"Openness to Experience","body":"This dimension reflects how readily you may explore unfamiliar ideas, perspectives, aesthetics, and ways of doing things. Different contexts can call for curiosity, continuity, or a blend of both."},{"code":"C","title":"Conscientiousness","body":"This dimension reflects how you may organize effort, follow plans, and manage responsibilities. Structure can support reliability, while flexibility can help when priorities change."},{"code":"E","title":"Extraversion","body":"This dimension reflects how you may engage with social stimulation, activity, and outward expression. Quiet and energetic settings can each support different kinds of contribution."},{"code":"A","title":"Agreeableness","body":"This dimension reflects how you may balance cooperation, trust, candor, and personal boundaries. Effective interaction can involve both consideration and clear disagreement."},{"code":"N","title":"Emotional Sensitivity","body":"This dimension reflects how readily you may notice stress, threat, or emotional shifts. Sensitivity can provide early signals, while steadiness can support recovery; neither range determines resilience or worth."}]}} -{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Awareness","description":"Attention to emotional nuance in yourself and in situations."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Low Mood Sensitivity","description":"Readiness to notice discouragement, loss, or reduced energy."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Stress Vulnerability","description":"Likelihood of feeling overloaded when demands accumulate."}]}} +{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Awareness","description":"Attention to emotional nuance in yourself and in situations."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Stress Vulnerability","description":"Likelihood of feeling overloaded when demands accumulate."}]}} {"asset_id":"big5.en.w2.score_range_boundary_copy","unit":"score_range_boundary_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Ranges describe relative tendencies in this response set, not grades or ability levels.","ranges":[{"key":"lower","label":"Lower range","description":"This tendency may be less prominent or may appear in narrower situations. Lower does not mean worse."},{"key":"middle","label":"Middle range","description":"You may shift between both sides of the dimension depending on context, role, or current demands."},{"key":"higher","label":"Higher range","description":"This tendency may appear more readily across situations. Higher does not mean better."}],"boundary":"Small differences near a range boundary should not be treated as a sharp change in personality."}} {"asset_id":"big5.en.w2.action_growth_advice","unit":"action_growth_advice","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Turn the result into small experiments","actions":[{"context":"awareness","prompt":"Choose one tendency and write down two recent situations where it helped and one where it created friction."},{"context":"flexibility","prompt":"Try a low-risk behavior from the other side of the dimension and observe what changes."},{"context":"environment","prompt":"Adjust one cue, routine, or boundary so the behavior you want is easier to repeat."},{"context":"review","prompt":"Revisit the experiment after a week and keep only what was useful in that context."}],"boundary":"These are reflection ideas, not treatment, performance, or career prescriptions."}} {"asset_id":"big5.en.w2.workplace_relationship_copy","unit":"workplace_relationship_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"workplace":{"title":"At work","body":"Your tendencies may shape how you plan, communicate, respond to change, and manage stimulation. Role expectations and team norms can strengthen or soften the pattern.","prompt":"Which working conditions help you contribute consistently, and which require deliberate adjustment?"},"relationships":{"title":"In relationships","body":"The same tendency may be helpful in one interaction and difficult in another. Consider communication habits, boundaries, repair, and the other person's context rather than ranking one style above another.","prompt":"What helps you stay clear and considerate when your preferences differ?"},"boundary":"This content does not predict job performance, determine employment decisions, rate relationship quality, or guarantee outcomes."}} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json index a1c91c743..bfd31f70b 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -6,12 +6,12 @@ {"path":"source_ledger.json","sha256":"a6d29ee8c6dbb1841dec21b5b735c8ade800509a3b85bdd8c52fc812e7d756ba"}, {"path":"translation_map.json","sha256":"d2cab97371f0392f647b5c057365ebf7001ecca7cd7b10cd6a172202fe4c965d"}, {"path":"claim_boundary_report.json","sha256":"13edb5670dc2e13b91e297184fb7787e665378af9c72c0199bb44175566deab8"}, - {"path":"content_assets.jsonl","sha256":"86c646c231b90c86a9dcacfc7670caeec0f6e8161b5c9e59236c06975d401a72"}, + {"path":"content_assets.jsonl","sha256":"8d8a15f01301d7a8a5503f89c3a3dc117cb0fc7c305d1f428883bb39df6a4048"}, {"path":"surface_coverage.json","sha256":"88e1141dc13350ab823e1815d8752ef5e110dcffaacdeace1038b5b0133ef476"}, {"path":"duplicate_report.json","sha256":"927e21140f2835a0e959f93da9f2e758553c591121840f5ec1bb451fb2f52a26"}, {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, {"path":"README.md","sha256":"f23c269d5b6f17079cd1263232c7f07a17285ef4c76df86d4640ae77ea9c3d85"}, {"path":"validate_package.php","sha256":"178c33561607027cd4e90d2884fd7c50ce634afdbbac28ac075892f81e0cc720"} ], - "package_sha256": "42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7" + "package_sha256": "6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7" } diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md index 88d372cfa..372f9111f 100644 --- a/backend/docs/seo/en-parity-w2-big-five-result-assets.md +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -10,7 +10,7 @@ The package contains natural English reader copy for previews, locked and full r - Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` -- Result content package SHA-256: `42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7` +- Result content package SHA-256: `6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7` ## Boundaries diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json index 7bada829e..f1a8b9774 100644 --- a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -10,7 +10,7 @@ }, "output_package": { "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", - "package_sha256": "42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7", + "package_sha256": "6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7", "inventory_unit_count": 16, "covered_unit_count": 16, "asset_group_count": 16, diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php index ee2076f73..d4d11ee69 100644 --- a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -133,6 +133,14 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar $this->assertSame([], $byUnit['analytics_reader_labels']['personal_result_fields']); $this->assertCount(5, $byUnit['five_dimension_explanations']['dimensions']); $this->assertCount(30, $byUnit['facet_subscale_explanations']['facets']); + $n3 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'N3' + ))[0]; + $this->assertSame('Sustained-Stress Depletion', $n3['label']); + $this->assertStringContainsString('under sustained pressure', $n3['description']); + $this->assertStringContainsString('drained, fatigued', $n3['description']); + $this->assertStringContainsString('energy needed to keep responding', $n3['description']); $n5 = array_values(array_filter( $byUnit['facet_subscale_explanations']['facets'], static fn (array $facet): bool => $facet['code'] === 'N5' @@ -159,7 +167,7 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void hash('sha256', implode("\n", $canonical)) ); $this->assertSame( - '42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7', + '6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7', $shaManifest['package_sha256'] ); } diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 257073189..fef4bfd7e 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -85849,7 +85849,7 @@ }, "scope_validation": { "allowed_paths_only": true, - "local_validation_passed": true, + "local_validation_passed": false, "github_checks_green": null, "post_merge_revalidated": false }, @@ -102419,7 +102419,7 @@ }, "local_validation": { "status": "pass", - "evidence": "Package validator passes twice byte-identically with SHA 42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7. Focused package PHPUnit passes 6 tests / 240 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + "evidence": "Package validator passes twice byte-identically with SHA 6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7. Focused package PHPUnit passes 6 tests / 244 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { "status": "pending", @@ -102428,7 +102428,7 @@ }, "scope_validation": { "allowed_paths_only": true, - "local_validation_passed": false, + "local_validation_passed": true, "github_checks_green": false, "post_merge_revalidated": false }, @@ -102464,8 +102464,13 @@ "at": "2026-07-31T05:47:03Z", "status": "review_fix_local_checks_passed", "note": "Inspected CI run 30607268537 verify-bigfive before editing: 1658 tests passed and the only failure was the runtime-freeze classifier treating the new draft package directory as runtime-impacting. Added an exact package-prefix exception plus positive/negative regression and declared the classifier test in scope. Exact-head review findings are also repaired: local_validation_passed is true, baseline tree OIDs resolve from pinned commit d9f1a5554bb9831a1a9dd87d76b41daf8bcac353 rather than the live checkout, and N5 now preserves the source facet's overload-driven disconnect/withdraw/change-state meaning. Package SHA rebuilt as 42760c9d3b7ae3449e1eaacccbd7c1b3dbdf78cae42cfef44d0063f640a54dd7; all focused, content-suite, Pint, parser, scan, diff, and scope checks pass." + }, + { + "at": "2026-07-31T05:58:55Z", + "status": "review_fix_local_checks_passed", + "note": "Inspected the two exact-head review findings before editing. Restored an unrelated existing task's local_validation_passed value and set the flag only on this train item. N3 now preserves the source facet's sustained-pressure depletion meaning, with focused label and semantic regression assertions. The byte-exact package was rebuilt as 6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7. Validator passes twice identically; the package suite passes 6 tests / 244 assertions, runtime-freeze regression passes, content suite passes, and Pint, syntax, parser, scan, diff, and exact 17-path scope validation pass." } ], - "updated_at": "2026-07-31T05:47:03Z" + "updated_at": "2026-07-31T05:58:55Z" } } From b5f44c0d1cfcf86f7841cf7deb9570575b1e0601 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 13:59:43 +0800 Subject: [PATCH 06/20] chore(pr-train): bind result asset review fix --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index fef4bfd7e..74364973c 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "33bcf875a896524383e7f6ba9173f7dbbaaba802", + "commit_sha": "4850a5706bfa15112781661cce2dbc576fef0dfd", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 repair head 33bcf875a896524383e7f6ba9173f7dbbaaba802 requires fresh exact-head checks and review after scoped CI and semantic repairs." + "evidence": "PR 3451 semantic repair head 4850a5706bfa15112781661cce2dbc576fef0dfd requires fresh exact-head checks and review after the N3 and ledger corrections." } }, "scope_validation": { From 5253de1d373ecb4c948ad6bd4e1d3d04aa099043 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 13:59:57 +0800 Subject: [PATCH 07/20] chore(pr-train): correct semantic repair SHA --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 74364973c..7755d84e4 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "4850a5706bfa15112781661cce2dbc576fef0dfd", + "commit_sha": "4850a5706e6c860495a46d29bea87c8442df789e", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 semantic repair head 4850a5706bfa15112781661cce2dbc576fef0dfd requires fresh exact-head checks and review after the N3 and ledger corrections." + "evidence": "PR 3451 semantic repair head 4850a5706e6c860495a46d29bea87c8442df789e requires fresh exact-head checks and review after the N3 and ledger corrections." } }, "scope_validation": { From 4662f8f248e16306d2df67a476c836eb068164f2 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:12:30 +0800 Subject: [PATCH 08/20] fix(big-five): preserve O3 result asset semantics --- .../en_parity/w2_result_content_v1/content_assets.jsonl | 2 +- .../en_parity/w2_result_content_v1/sha256_manifest.json | 4 ++-- backend/docs/seo/en-parity-w2-big-five-result-assets.md | 2 +- .../en-parity-w2-big-five-result-assets.v1.json | 2 +- .../Content/BigFiveEnglishResultAssetPackageTest.php | 9 ++++++++- docs/codex/pr-train-state.json | 9 +++++++-- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl index 9a84869b6..504fe5f15 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl @@ -3,7 +3,7 @@ {"asset_id":"big5.en.w2.paid_full_report","unit":"paid_full_report","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your full Big Five report","intro":"Read the report as a set of working hypotheses. Each dimension describes a continuum, and the pattern may appear differently across work, relationships, stress, and unfamiliar situations.","section_intro":"Explore the five dimensions, the facets within them, and actions you may want to test. No single score defines your ability, character, or future.","closing":"Keep what is useful, question what does not fit, and revisit the result alongside real examples from your life."}} {"asset_id":"big5.en.w2.entitlement_levels","unit":"entitlement_levels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"levels":[{"key":"preview","label":"Preview","description":"A short, private snapshot of selected tendencies."},{"key":"core","label":"Core result","description":"All five dimension ranges with concise explanations."},{"key":"full","label":"Full report","description":"Dimension and facet context, reflection prompts, and practical action ideas."}],"boundary":"Access levels describe available content only. They do not indicate result quality, certainty, or personal potential."}} {"asset_id":"big5.en.w2.five_dimension_explanations","unit":"five_dimension_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"dimensions":[{"code":"O","title":"Openness to Experience","body":"This dimension reflects how readily you may explore unfamiliar ideas, perspectives, aesthetics, and ways of doing things. Different contexts can call for curiosity, continuity, or a blend of both."},{"code":"C","title":"Conscientiousness","body":"This dimension reflects how you may organize effort, follow plans, and manage responsibilities. Structure can support reliability, while flexibility can help when priorities change."},{"code":"E","title":"Extraversion","body":"This dimension reflects how you may engage with social stimulation, activity, and outward expression. Quiet and energetic settings can each support different kinds of contribution."},{"code":"A","title":"Agreeableness","body":"This dimension reflects how you may balance cooperation, trust, candor, and personal boundaries. Effective interaction can involve both consideration and clear disagreement."},{"code":"N","title":"Emotional Sensitivity","body":"This dimension reflects how readily you may notice stress, threat, or emotional shifts. Sensitivity can provide early signals, while steadiness can support recovery; neither range determines resilience or worth."}]}} -{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Awareness","description":"Attention to emotional nuance in yourself and in situations."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Stress Vulnerability","description":"Likelihood of feeling overloaded when demands accumulate."}]}} +{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Stress Vulnerability","description":"Likelihood of feeling overloaded when demands accumulate."}]}} {"asset_id":"big5.en.w2.score_range_boundary_copy","unit":"score_range_boundary_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Ranges describe relative tendencies in this response set, not grades or ability levels.","ranges":[{"key":"lower","label":"Lower range","description":"This tendency may be less prominent or may appear in narrower situations. Lower does not mean worse."},{"key":"middle","label":"Middle range","description":"You may shift between both sides of the dimension depending on context, role, or current demands."},{"key":"higher","label":"Higher range","description":"This tendency may appear more readily across situations. Higher does not mean better."}],"boundary":"Small differences near a range boundary should not be treated as a sharp change in personality."}} {"asset_id":"big5.en.w2.action_growth_advice","unit":"action_growth_advice","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Turn the result into small experiments","actions":[{"context":"awareness","prompt":"Choose one tendency and write down two recent situations where it helped and one where it created friction."},{"context":"flexibility","prompt":"Try a low-risk behavior from the other side of the dimension and observe what changes."},{"context":"environment","prompt":"Adjust one cue, routine, or boundary so the behavior you want is easier to repeat."},{"context":"review","prompt":"Revisit the experiment after a week and keep only what was useful in that context."}],"boundary":"These are reflection ideas, not treatment, performance, or career prescriptions."}} {"asset_id":"big5.en.w2.workplace_relationship_copy","unit":"workplace_relationship_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"workplace":{"title":"At work","body":"Your tendencies may shape how you plan, communicate, respond to change, and manage stimulation. Role expectations and team norms can strengthen or soften the pattern.","prompt":"Which working conditions help you contribute consistently, and which require deliberate adjustment?"},"relationships":{"title":"In relationships","body":"The same tendency may be helpful in one interaction and difficult in another. Consider communication habits, boundaries, repair, and the other person's context rather than ranking one style above another.","prompt":"What helps you stay clear and considerate when your preferences differ?"},"boundary":"This content does not predict job performance, determine employment decisions, rate relationship quality, or guarantee outcomes."}} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json index bfd31f70b..a18345775 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -6,12 +6,12 @@ {"path":"source_ledger.json","sha256":"a6d29ee8c6dbb1841dec21b5b735c8ade800509a3b85bdd8c52fc812e7d756ba"}, {"path":"translation_map.json","sha256":"d2cab97371f0392f647b5c057365ebf7001ecca7cd7b10cd6a172202fe4c965d"}, {"path":"claim_boundary_report.json","sha256":"13edb5670dc2e13b91e297184fb7787e665378af9c72c0199bb44175566deab8"}, - {"path":"content_assets.jsonl","sha256":"8d8a15f01301d7a8a5503f89c3a3dc117cb0fc7c305d1f428883bb39df6a4048"}, + {"path":"content_assets.jsonl","sha256":"0efbbfb79b44900248b67e43294829afc557b2b436300c0e55c6f4d886a6f496"}, {"path":"surface_coverage.json","sha256":"88e1141dc13350ab823e1815d8752ef5e110dcffaacdeace1038b5b0133ef476"}, {"path":"duplicate_report.json","sha256":"927e21140f2835a0e959f93da9f2e758553c591121840f5ec1bb451fb2f52a26"}, {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, {"path":"README.md","sha256":"f23c269d5b6f17079cd1263232c7f07a17285ef4c76df86d4640ae77ea9c3d85"}, {"path":"validate_package.php","sha256":"178c33561607027cd4e90d2884fd7c50ce634afdbbac28ac075892f81e0cc720"} ], - "package_sha256": "6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7" + "package_sha256": "ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70" } diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md index 372f9111f..004da1371 100644 --- a/backend/docs/seo/en-parity-w2-big-five-result-assets.md +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -10,7 +10,7 @@ The package contains natural English reader copy for previews, locked and full r - Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` -- Result content package SHA-256: `6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7` +- Result content package SHA-256: `ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70` ## Boundaries diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json index f1a8b9774..f7aefe17d 100644 --- a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -10,7 +10,7 @@ }, "output_package": { "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", - "package_sha256": "6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7", + "package_sha256": "ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70", "inventory_unit_count": 16, "covered_unit_count": 16, "asset_group_count": 16, diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php index d4d11ee69..ba8a586de 100644 --- a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -133,6 +133,13 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar $this->assertSame([], $byUnit['analytics_reader_labels']['personal_result_fields']); $this->assertCount(5, $byUnit['five_dimension_explanations']['dimensions']); $this->assertCount(30, $byUnit['facet_subscale_explanations']['facets']); + $o3 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'O3' + ))[0]; + $this->assertSame('Emotional Receptivity', $o3['label']); + $this->assertStringContainsString('identify, approach, and express inner feelings', $o3['description']); + $this->assertStringContainsString('use them as information', $o3['description']); $n3 = array_values(array_filter( $byUnit['facet_subscale_explanations']['facets'], static fn (array $facet): bool => $facet['code'] === 'N3' @@ -167,7 +174,7 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void hash('sha256', implode("\n", $canonical)) ); $this->assertSame( - '6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7', + 'ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70', $shaManifest['package_sha256'] ); } diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 7755d84e4..b0f6838b5 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102419,7 +102419,7 @@ }, "local_validation": { "status": "pass", - "evidence": "Package validator passes twice byte-identically with SHA 6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7. Focused package PHPUnit passes 6 tests / 244 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + "evidence": "Package validator passes twice byte-identically with SHA ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70. Focused package PHPUnit passes 6 tests / 247 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { "status": "pending", @@ -102469,8 +102469,13 @@ "at": "2026-07-31T05:58:55Z", "status": "review_fix_local_checks_passed", "note": "Inspected the two exact-head review findings before editing. Restored an unrelated existing task's local_validation_passed value and set the flag only on this train item. N3 now preserves the source facet's sustained-pressure depletion meaning, with focused label and semantic regression assertions. The byte-exact package was rebuilt as 6543c9818a272330c55256a0359bce7ee0223591cb46d06436ac06245f6a2cc7. Validator passes twice identically; the package suite passes 6 tests / 244 assertions, runtime-freeze regression passes, content suite passes, and Pint, syntax, parser, scan, diff, and exact 17-path scope validation pass." + }, + { + "at": "2026-07-31T06:12:00Z", + "status": "review_fix_local_checks_passed", + "note": "After all nine applicable required checks passed on exact head 5253de1d373ecb4c948ad6bd4e1d3d04aa099043, exact-head review identified one remaining O3 semantic drift. O3 now preserves the pinned source authority's willingness to identify, approach, express, and use inner feelings as information, with three focused semantic assertions. The byte-exact package was rebuilt as ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70. Validator passes twice identically; package suite passes 6 tests / 247 assertions, content suite passes 4 tests / 62 assertions, and Pint, parsers, diff, and exact 17-path scope validation pass." } ], - "updated_at": "2026-07-31T05:58:55Z" + "updated_at": "2026-07-31T06:12:00Z" } } From 4798999c49381693d97e1be52f691d694c701bce Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:12:53 +0800 Subject: [PATCH 09/20] chore(pr-train): bind O3 semantic repair --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index b0f6838b5..7b8c884f5 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "4850a5706e6c860495a46d29bea87c8442df789e", + "commit_sha": "4662f8f248e16306d2df67a476c836eb068164f2", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 semantic repair head 4850a5706e6c860495a46d29bea87c8442df789e requires fresh exact-head checks and review after the N3 and ledger corrections." + "evidence": "PR 3451 semantic repair head 4662f8f248e16306d2df67a476c836eb068164f2 requires fresh exact-head checks and review after the O3 correction." } }, "scope_validation": { From 3c01feea891037382b8e5b1637e8cb320979417d Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:25:58 +0800 Subject: [PATCH 10/20] fix(big-five): preserve N6 result asset semantics --- .../en_parity/w2_result_content_v1/content_assets.jsonl | 2 +- .../en_parity/w2_result_content_v1/sha256_manifest.json | 4 ++-- backend/docs/seo/en-parity-w2-big-five-result-assets.md | 2 +- .../en-parity-w2-big-five-result-assets.v1.json | 2 +- .../Content/BigFiveEnglishResultAssetPackageTest.php | 9 ++++++++- docs/codex/pr-train-state.json | 9 +++++++-- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl index 504fe5f15..f61974211 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl @@ -3,7 +3,7 @@ {"asset_id":"big5.en.w2.paid_full_report","unit":"paid_full_report","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your full Big Five report","intro":"Read the report as a set of working hypotheses. Each dimension describes a continuum, and the pattern may appear differently across work, relationships, stress, and unfamiliar situations.","section_intro":"Explore the five dimensions, the facets within them, and actions you may want to test. No single score defines your ability, character, or future.","closing":"Keep what is useful, question what does not fit, and revisit the result alongside real examples from your life."}} {"asset_id":"big5.en.w2.entitlement_levels","unit":"entitlement_levels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"levels":[{"key":"preview","label":"Preview","description":"A short, private snapshot of selected tendencies."},{"key":"core","label":"Core result","description":"All five dimension ranges with concise explanations."},{"key":"full","label":"Full report","description":"Dimension and facet context, reflection prompts, and practical action ideas."}],"boundary":"Access levels describe available content only. They do not indicate result quality, certainty, or personal potential."}} {"asset_id":"big5.en.w2.five_dimension_explanations","unit":"five_dimension_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"dimensions":[{"code":"O","title":"Openness to Experience","body":"This dimension reflects how readily you may explore unfamiliar ideas, perspectives, aesthetics, and ways of doing things. Different contexts can call for curiosity, continuity, or a blend of both."},{"code":"C","title":"Conscientiousness","body":"This dimension reflects how you may organize effort, follow plans, and manage responsibilities. Structure can support reliability, while flexibility can help when priorities change."},{"code":"E","title":"Extraversion","body":"This dimension reflects how you may engage with social stimulation, activity, and outward expression. Quiet and energetic settings can each support different kinds of contribution."},{"code":"A","title":"Agreeableness","body":"This dimension reflects how you may balance cooperation, trust, candor, and personal boundaries. Effective interaction can involve both consideration and clear disagreement."},{"code":"N","title":"Emotional Sensitivity","body":"This dimension reflects how readily you may notice stress, threat, or emotional shifts. Sensitivity can provide early signals, while steadiness can support recovery; neither range determines resilience or worth."}]}} -{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Stress Vulnerability","description":"Likelihood of feeling overloaded when demands accumulate."}]}} +{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Coping-Limit Vulnerability","description":"Tendency to reach visible coping limits more readily under high pressure, loss of control, or complex demands."}]}} {"asset_id":"big5.en.w2.score_range_boundary_copy","unit":"score_range_boundary_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Ranges describe relative tendencies in this response set, not grades or ability levels.","ranges":[{"key":"lower","label":"Lower range","description":"This tendency may be less prominent or may appear in narrower situations. Lower does not mean worse."},{"key":"middle","label":"Middle range","description":"You may shift between both sides of the dimension depending on context, role, or current demands."},{"key":"higher","label":"Higher range","description":"This tendency may appear more readily across situations. Higher does not mean better."}],"boundary":"Small differences near a range boundary should not be treated as a sharp change in personality."}} {"asset_id":"big5.en.w2.action_growth_advice","unit":"action_growth_advice","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Turn the result into small experiments","actions":[{"context":"awareness","prompt":"Choose one tendency and write down two recent situations where it helped and one where it created friction."},{"context":"flexibility","prompt":"Try a low-risk behavior from the other side of the dimension and observe what changes."},{"context":"environment","prompt":"Adjust one cue, routine, or boundary so the behavior you want is easier to repeat."},{"context":"review","prompt":"Revisit the experiment after a week and keep only what was useful in that context."}],"boundary":"These are reflection ideas, not treatment, performance, or career prescriptions."}} {"asset_id":"big5.en.w2.workplace_relationship_copy","unit":"workplace_relationship_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"workplace":{"title":"At work","body":"Your tendencies may shape how you plan, communicate, respond to change, and manage stimulation. Role expectations and team norms can strengthen or soften the pattern.","prompt":"Which working conditions help you contribute consistently, and which require deliberate adjustment?"},"relationships":{"title":"In relationships","body":"The same tendency may be helpful in one interaction and difficult in another. Consider communication habits, boundaries, repair, and the other person's context rather than ranking one style above another.","prompt":"What helps you stay clear and considerate when your preferences differ?"},"boundary":"This content does not predict job performance, determine employment decisions, rate relationship quality, or guarantee outcomes."}} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json index a18345775..3ee748455 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -6,12 +6,12 @@ {"path":"source_ledger.json","sha256":"a6d29ee8c6dbb1841dec21b5b735c8ade800509a3b85bdd8c52fc812e7d756ba"}, {"path":"translation_map.json","sha256":"d2cab97371f0392f647b5c057365ebf7001ecca7cd7b10cd6a172202fe4c965d"}, {"path":"claim_boundary_report.json","sha256":"13edb5670dc2e13b91e297184fb7787e665378af9c72c0199bb44175566deab8"}, - {"path":"content_assets.jsonl","sha256":"0efbbfb79b44900248b67e43294829afc557b2b436300c0e55c6f4d886a6f496"}, + {"path":"content_assets.jsonl","sha256":"a9742a670d5b65378951b6bcc821010a140bb4276d84bfb3f262a42b4f84e584"}, {"path":"surface_coverage.json","sha256":"88e1141dc13350ab823e1815d8752ef5e110dcffaacdeace1038b5b0133ef476"}, {"path":"duplicate_report.json","sha256":"927e21140f2835a0e959f93da9f2e758553c591121840f5ec1bb451fb2f52a26"}, {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, {"path":"README.md","sha256":"f23c269d5b6f17079cd1263232c7f07a17285ef4c76df86d4640ae77ea9c3d85"}, {"path":"validate_package.php","sha256":"178c33561607027cd4e90d2884fd7c50ce634afdbbac28ac075892f81e0cc720"} ], - "package_sha256": "ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70" + "package_sha256": "479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908" } diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md index 004da1371..e4794572d 100644 --- a/backend/docs/seo/en-parity-w2-big-five-result-assets.md +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -10,7 +10,7 @@ The package contains natural English reader copy for previews, locked and full r - Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` -- Result content package SHA-256: `ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70` +- Result content package SHA-256: `479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908` ## Boundaries diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json index f7aefe17d..595086e71 100644 --- a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -10,7 +10,7 @@ }, "output_package": { "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", - "package_sha256": "ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70", + "package_sha256": "479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908", "inventory_unit_count": 16, "covered_unit_count": 16, "asset_group_count": 16, diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php index ba8a586de..dc25e1e67 100644 --- a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -155,6 +155,13 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar $this->assertSame('Overload Exit Urge', $n5['label']); $this->assertStringContainsString('when overloaded', $n5['description']); $this->assertStringContainsString('disconnect, withdraw, or change the situation immediately', $n5['description']); + $n6 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'N6' + ))[0]; + $this->assertSame('Coping-Limit Vulnerability', $n6['label']); + $this->assertStringContainsString('visible coping limits', $n6['description']); + $this->assertStringContainsString('high pressure, loss of control, or complex demands', $n6['description']); } #[Test] @@ -174,7 +181,7 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void hash('sha256', implode("\n", $canonical)) ); $this->assertSame( - 'ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70', + '479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908', $shaManifest['package_sha256'] ); } diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 7b8c884f5..6a69822a9 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102419,7 +102419,7 @@ }, "local_validation": { "status": "pass", - "evidence": "Package validator passes twice byte-identically with SHA ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70. Focused package PHPUnit passes 6 tests / 247 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + "evidence": "Package validator passes twice byte-identically with SHA 479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908. Focused package PHPUnit passes 6 tests / 250 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { "status": "pending", @@ -102474,8 +102474,13 @@ "at": "2026-07-31T06:12:00Z", "status": "review_fix_local_checks_passed", "note": "After all nine applicable required checks passed on exact head 5253de1d373ecb4c948ad6bd4e1d3d04aa099043, exact-head review identified one remaining O3 semantic drift. O3 now preserves the pinned source authority's willingness to identify, approach, express, and use inner feelings as information, with three focused semantic assertions. The byte-exact package was rebuilt as ca7a77819b74f0b0127b2f01fc626c28120903ac56cbfc77cdc60ea4af789b70. Validator passes twice identically; package suite passes 6 tests / 247 assertions, content suite passes 4 tests / 62 assertions, and Pint, parsers, diff, and exact 17-path scope validation pass." + }, + { + "at": "2026-07-31T06:25:35Z", + "status": "review_fix_local_checks_passed", + "note": "After all nine applicable required checks passed on exact head 4798999c49381693d97e1be52f691d694c701bce, exact-head review identified one remaining N6 semantic drift. N6 now preserves the pinned source authority's visible coping-limit vulnerability under high pressure, loss of control, and complex demands, with three focused semantic assertions. The byte-exact package was rebuilt as 479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908. Validator passes twice identically; package suite passes 6 tests / 250 assertions, content suite passes 4 tests / 62 assertions, and Pint, parsers, diff, and exact 17-path scope validation pass." } ], - "updated_at": "2026-07-31T06:12:00Z" + "updated_at": "2026-07-31T06:25:35Z" } } From f72ca150846d4d31072cc6866200c23c8764aa57 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:26:17 +0800 Subject: [PATCH 11/20] chore(pr-train): bind N6 semantic repair --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 6a69822a9..32f9d30bd 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "4662f8f248e16306d2df67a476c836eb068164f2", + "commit_sha": "3c01feea891037382b8e5b1637e8cb320979417d", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 semantic repair head 4662f8f248e16306d2df67a476c836eb068164f2 requires fresh exact-head checks and review after the O3 correction." + "evidence": "PR 3451 semantic repair head 3c01feea891037382b8e5b1637e8cb320979417d requires fresh exact-head checks and review after the N6 correction." } }, "scope_validation": { From 8de88ef1bd5c6e81dccfe1852b78e01be3aedfb8 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:34:14 +0800 Subject: [PATCH 12/20] fix(big-five): preserve C5 result asset semantics --- .../en_parity/w2_result_content_v1/content_assets.jsonl | 2 +- .../en_parity/w2_result_content_v1/sha256_manifest.json | 4 ++-- backend/docs/seo/en-parity-w2-big-five-result-assets.md | 2 +- .../en-parity-w2-big-five-result-assets.v1.json | 2 +- .../Content/BigFiveEnglishResultAssetPackageTest.php | 9 ++++++++- docs/codex/pr-train-state.json | 9 +++++++-- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl index f61974211..7e444a67e 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl @@ -3,7 +3,7 @@ {"asset_id":"big5.en.w2.paid_full_report","unit":"paid_full_report","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your full Big Five report","intro":"Read the report as a set of working hypotheses. Each dimension describes a continuum, and the pattern may appear differently across work, relationships, stress, and unfamiliar situations.","section_intro":"Explore the five dimensions, the facets within them, and actions you may want to test. No single score defines your ability, character, or future.","closing":"Keep what is useful, question what does not fit, and revisit the result alongside real examples from your life."}} {"asset_id":"big5.en.w2.entitlement_levels","unit":"entitlement_levels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"levels":[{"key":"preview","label":"Preview","description":"A short, private snapshot of selected tendencies."},{"key":"core","label":"Core result","description":"All five dimension ranges with concise explanations."},{"key":"full","label":"Full report","description":"Dimension and facet context, reflection prompts, and practical action ideas."}],"boundary":"Access levels describe available content only. They do not indicate result quality, certainty, or personal potential."}} {"asset_id":"big5.en.w2.five_dimension_explanations","unit":"five_dimension_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"dimensions":[{"code":"O","title":"Openness to Experience","body":"This dimension reflects how readily you may explore unfamiliar ideas, perspectives, aesthetics, and ways of doing things. Different contexts can call for curiosity, continuity, or a blend of both."},{"code":"C","title":"Conscientiousness","body":"This dimension reflects how you may organize effort, follow plans, and manage responsibilities. Structure can support reliability, while flexibility can help when priorities change."},{"code":"E","title":"Extraversion","body":"This dimension reflects how you may engage with social stimulation, activity, and outward expression. Quiet and energetic settings can each support different kinds of contribution."},{"code":"A","title":"Agreeableness","body":"This dimension reflects how you may balance cooperation, trust, candor, and personal boundaries. Effective interaction can involve both consideration and clear disagreement."},{"code":"N","title":"Emotional Sensitivity","body":"This dimension reflects how readily you may notice stress, threat, or emotional shifts. Sensitivity can provide early signals, while steadiness can support recovery; neither range determines resilience or worth."}]}} -{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Self-Discipline","description":"Ability to continue effort when interest or energy fluctuates."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Coping-Limit Vulnerability","description":"Tendency to reach visible coping limits more readily under high pressure, loss of control, or complex demands."}]}} +{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Delayed-Feedback Persistence","description":"Ability to keep making progress when feedback or reward is not immediate."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Coping-Limit Vulnerability","description":"Tendency to reach visible coping limits more readily under high pressure, loss of control, or complex demands."}]}} {"asset_id":"big5.en.w2.score_range_boundary_copy","unit":"score_range_boundary_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Ranges describe relative tendencies in this response set, not grades or ability levels.","ranges":[{"key":"lower","label":"Lower range","description":"This tendency may be less prominent or may appear in narrower situations. Lower does not mean worse."},{"key":"middle","label":"Middle range","description":"You may shift between both sides of the dimension depending on context, role, or current demands."},{"key":"higher","label":"Higher range","description":"This tendency may appear more readily across situations. Higher does not mean better."}],"boundary":"Small differences near a range boundary should not be treated as a sharp change in personality."}} {"asset_id":"big5.en.w2.action_growth_advice","unit":"action_growth_advice","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Turn the result into small experiments","actions":[{"context":"awareness","prompt":"Choose one tendency and write down two recent situations where it helped and one where it created friction."},{"context":"flexibility","prompt":"Try a low-risk behavior from the other side of the dimension and observe what changes."},{"context":"environment","prompt":"Adjust one cue, routine, or boundary so the behavior you want is easier to repeat."},{"context":"review","prompt":"Revisit the experiment after a week and keep only what was useful in that context."}],"boundary":"These are reflection ideas, not treatment, performance, or career prescriptions."}} {"asset_id":"big5.en.w2.workplace_relationship_copy","unit":"workplace_relationship_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"workplace":{"title":"At work","body":"Your tendencies may shape how you plan, communicate, respond to change, and manage stimulation. Role expectations and team norms can strengthen or soften the pattern.","prompt":"Which working conditions help you contribute consistently, and which require deliberate adjustment?"},"relationships":{"title":"In relationships","body":"The same tendency may be helpful in one interaction and difficult in another. Consider communication habits, boundaries, repair, and the other person's context rather than ranking one style above another.","prompt":"What helps you stay clear and considerate when your preferences differ?"},"boundary":"This content does not predict job performance, determine employment decisions, rate relationship quality, or guarantee outcomes."}} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json index 3ee748455..1970d2b94 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -6,12 +6,12 @@ {"path":"source_ledger.json","sha256":"a6d29ee8c6dbb1841dec21b5b735c8ade800509a3b85bdd8c52fc812e7d756ba"}, {"path":"translation_map.json","sha256":"d2cab97371f0392f647b5c057365ebf7001ecca7cd7b10cd6a172202fe4c965d"}, {"path":"claim_boundary_report.json","sha256":"13edb5670dc2e13b91e297184fb7787e665378af9c72c0199bb44175566deab8"}, - {"path":"content_assets.jsonl","sha256":"a9742a670d5b65378951b6bcc821010a140bb4276d84bfb3f262a42b4f84e584"}, + {"path":"content_assets.jsonl","sha256":"0e350d0fb2711b4dd52685a41cebcbd718eebc98421735144b3d64cfe1848780"}, {"path":"surface_coverage.json","sha256":"88e1141dc13350ab823e1815d8752ef5e110dcffaacdeace1038b5b0133ef476"}, {"path":"duplicate_report.json","sha256":"927e21140f2835a0e959f93da9f2e758553c591121840f5ec1bb451fb2f52a26"}, {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, {"path":"README.md","sha256":"f23c269d5b6f17079cd1263232c7f07a17285ef4c76df86d4640ae77ea9c3d85"}, {"path":"validate_package.php","sha256":"178c33561607027cd4e90d2884fd7c50ce634afdbbac28ac075892f81e0cc720"} ], - "package_sha256": "479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908" + "package_sha256": "76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851" } diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md index e4794572d..a5ac79d13 100644 --- a/backend/docs/seo/en-parity-w2-big-five-result-assets.md +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -10,7 +10,7 @@ The package contains natural English reader copy for previews, locked and full r - Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` -- Result content package SHA-256: `479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908` +- Result content package SHA-256: `76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851` ## Boundaries diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json index 595086e71..d45ae9df8 100644 --- a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -10,7 +10,7 @@ }, "output_package": { "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", - "package_sha256": "479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908", + "package_sha256": "76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851", "inventory_unit_count": 16, "covered_unit_count": 16, "asset_group_count": 16, diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php index dc25e1e67..c40ff8c03 100644 --- a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -140,6 +140,13 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar $this->assertSame('Emotional Receptivity', $o3['label']); $this->assertStringContainsString('identify, approach, and express inner feelings', $o3['description']); $this->assertStringContainsString('use them as information', $o3['description']); + $c5 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'C5' + ))[0]; + $this->assertSame('Delayed-Feedback Persistence', $c5['label']); + $this->assertStringContainsString('keep making progress', $c5['description']); + $this->assertStringContainsString('feedback or reward is not immediate', $c5['description']); $n3 = array_values(array_filter( $byUnit['facet_subscale_explanations']['facets'], static fn (array $facet): bool => $facet['code'] === 'N3' @@ -181,7 +188,7 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void hash('sha256', implode("\n", $canonical)) ); $this->assertSame( - '479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908', + '76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851', $shaManifest['package_sha256'] ); } diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 32f9d30bd..4b14be18d 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102419,7 +102419,7 @@ }, "local_validation": { "status": "pass", - "evidence": "Package validator passes twice byte-identically with SHA 479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908. Focused package PHPUnit passes 6 tests / 250 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + "evidence": "Package validator passes twice byte-identically with SHA 76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851. Focused package PHPUnit passes 6 tests / 253 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { "status": "pending", @@ -102479,8 +102479,13 @@ "at": "2026-07-31T06:25:35Z", "status": "review_fix_local_checks_passed", "note": "After all nine applicable required checks passed on exact head 4798999c49381693d97e1be52f691d694c701bce, exact-head review identified one remaining N6 semantic drift. N6 now preserves the pinned source authority's visible coping-limit vulnerability under high pressure, loss of control, and complex demands, with three focused semantic assertions. The byte-exact package was rebuilt as 479d071448e0b3385a3814d2256c4c084574746dcb2413dbf4ecb4107a221908. Validator passes twice identically; package suite passes 6 tests / 250 assertions, content suite passes 4 tests / 62 assertions, and Pint, parsers, diff, and exact 17-path scope validation pass." + }, + { + "at": "2026-07-31T06:33:53Z", + "status": "review_fix_local_checks_passed", + "note": "Exact-head review on f72ca150846d4d31072cc6866200c23c8764aa57 identified one remaining C5 semantic drift. C5 now preserves the pinned source authority's continued progress without immediate feedback or reward, with three focused semantic assertions. The byte-exact package was rebuilt as 76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851. Validator passes twice identically; package suite passes 6 tests / 253 assertions, content suite passes 4 tests / 62 assertions, and Pint, parsers, diff, and exact 17-path scope validation pass." } ], - "updated_at": "2026-07-31T06:25:35Z" + "updated_at": "2026-07-31T06:33:53Z" } } From 675e96810e1c2359c67cf07edfdf9e5ce6b6fe81 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:34:30 +0800 Subject: [PATCH 13/20] chore(pr-train): bind C5 semantic repair --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 4b14be18d..d3fa6e2a4 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "3c01feea891037382b8e5b1637e8cb320979417d", + "commit_sha": "8de88ef1bd5c6e81dccfe1852b78e01be3aedfb8", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 semantic repair head 3c01feea891037382b8e5b1637e8cb320979417d requires fresh exact-head checks and review after the N6 correction." + "evidence": "PR 3451 semantic repair head 8de88ef1bd5c6e81dccfe1852b78e01be3aedfb8 requires fresh exact-head checks and review after the C5 correction." } }, "scope_validation": { From 42f37751365de60c9f1f9dd7e3682c79bedc98bd Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:49:04 +0800 Subject: [PATCH 14/20] fix(big-five): reconcile frozen W2 inventory rows --- .../en_parity/w2_result_content_v1/README.md | 4 +- .../w2_result_content_v1/content_assets.jsonl | 2 +- .../duplicate_report.json | 3 + .../inventory_row_reconciliation.json | 141 ++++++++++++++++++ .../package_manifest.json | 9 ++ .../w2_result_content_v1/sha256_manifest.json | 17 ++- .../w2_result_content_v1/source_ledger.json | 11 ++ .../surface_coverage.json | 9 ++ .../w2_result_content_v1/validate_package.php | 78 ++++++++++ .../en-parity-w2-big-five-result-assets.md | 4 +- ...n-parity-w2-big-five-result-assets.v1.json | 12 +- .../BigFiveEnglishResultAssetPackageTest.php | 78 +++++++++- docs/codex/pr-train-state.json | 9 +- 13 files changed, 362 insertions(+), 15 deletions(-) create mode 100644 backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md index e8b9bc8fd..7a2569066 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md @@ -9,6 +9,8 @@ The package is a producer draft for manual review. It is not a runtime registry, - Inventory PR: `EN-PARITY-W2-BIG5-INVENTORY-01` / PR 1866 - Inventory merge: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` +- Inventory source-ledger SHA-256: `facbf57a362a430cdc8b5f6545db4a227e1268d285e2c27beed3c935ea9cf6e2` +- `inventory_row_reconciliation.json` preserves all 118 frozen row IDs: 52 completed public controls, 50 reconciled historical revisions, and 16 result-content rows mapped to exact draft asset IDs and required content/item keys. ## Safety and authority @@ -29,4 +31,4 @@ php backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/ cd backend && php artisan test tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php --no-ansi ``` -Both checks fail closed on unit drift, duplicate coverage, malformed JSON/JSONL, CJK leakage, private-field leakage, forbidden claims, permission drift, or SHA mismatch. +Both checks fail closed on 118-row inventory drift, result-row or required-key mismatch, unit drift, duplicate coverage, malformed JSON/JSONL, CJK leakage, private-field leakage, forbidden claims, permission drift, or SHA mismatch. diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl index 7e444a67e..f0cc37877 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl @@ -3,7 +3,7 @@ {"asset_id":"big5.en.w2.paid_full_report","unit":"paid_full_report","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your full Big Five report","intro":"Read the report as a set of working hypotheses. Each dimension describes a continuum, and the pattern may appear differently across work, relationships, stress, and unfamiliar situations.","section_intro":"Explore the five dimensions, the facets within them, and actions you may want to test. No single score defines your ability, character, or future.","closing":"Keep what is useful, question what does not fit, and revisit the result alongside real examples from your life."}} {"asset_id":"big5.en.w2.entitlement_levels","unit":"entitlement_levels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"levels":[{"key":"preview","label":"Preview","description":"A short, private snapshot of selected tendencies."},{"key":"core","label":"Core result","description":"All five dimension ranges with concise explanations."},{"key":"full","label":"Full report","description":"Dimension and facet context, reflection prompts, and practical action ideas."}],"boundary":"Access levels describe available content only. They do not indicate result quality, certainty, or personal potential."}} {"asset_id":"big5.en.w2.five_dimension_explanations","unit":"five_dimension_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"dimensions":[{"code":"O","title":"Openness to Experience","body":"This dimension reflects how readily you may explore unfamiliar ideas, perspectives, aesthetics, and ways of doing things. Different contexts can call for curiosity, continuity, or a blend of both."},{"code":"C","title":"Conscientiousness","body":"This dimension reflects how you may organize effort, follow plans, and manage responsibilities. Structure can support reliability, while flexibility can help when priorities change."},{"code":"E","title":"Extraversion","body":"This dimension reflects how you may engage with social stimulation, activity, and outward expression. Quiet and energetic settings can each support different kinds of contribution."},{"code":"A","title":"Agreeableness","body":"This dimension reflects how you may balance cooperation, trust, candor, and personal boundaries. Effective interaction can involve both consideration and clear disagreement."},{"code":"N","title":"Emotional Sensitivity","body":"This dimension reflects how readily you may notice stress, threat, or emotional shifts. Sensitivity can provide early signals, while steadiness can support recovery; neither range determines resilience or worth."}]}} -{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Delayed-Feedback Persistence","description":"Ability to keep making progress when feedback or reward is not immediate."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Cooperation","description":"Preference for reducing unnecessary conflict and finding workable agreement."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Irritability","description":"Readiness to experience frustration when needs or expectations are blocked."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Coping-Limit Vulnerability","description":"Tendency to reach visible coping limits more readily under high pressure, loss of control, or complex demands."}]}} +{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Delayed-Feedback Persistence","description":"Ability to keep making progress when feedback or reward is not immediate."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Conflict Mediation","description":"Tendency during disagreement to maintain the relationship, yield when useful, and prevent escalation."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Anger Activation","description":"Readiness for internal anger or resistance when obstructed, misunderstood, or when a boundary is violated."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Coping-Limit Vulnerability","description":"Tendency to reach visible coping limits more readily under high pressure, loss of control, or complex demands."}]}} {"asset_id":"big5.en.w2.score_range_boundary_copy","unit":"score_range_boundary_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Ranges describe relative tendencies in this response set, not grades or ability levels.","ranges":[{"key":"lower","label":"Lower range","description":"This tendency may be less prominent or may appear in narrower situations. Lower does not mean worse."},{"key":"middle","label":"Middle range","description":"You may shift between both sides of the dimension depending on context, role, or current demands."},{"key":"higher","label":"Higher range","description":"This tendency may appear more readily across situations. Higher does not mean better."}],"boundary":"Small differences near a range boundary should not be treated as a sharp change in personality."}} {"asset_id":"big5.en.w2.action_growth_advice","unit":"action_growth_advice","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Turn the result into small experiments","actions":[{"context":"awareness","prompt":"Choose one tendency and write down two recent situations where it helped and one where it created friction."},{"context":"flexibility","prompt":"Try a low-risk behavior from the other side of the dimension and observe what changes."},{"context":"environment","prompt":"Adjust one cue, routine, or boundary so the behavior you want is easier to repeat."},{"context":"review","prompt":"Revisit the experiment after a week and keep only what was useful in that context."}],"boundary":"These are reflection ideas, not treatment, performance, or career prescriptions."}} {"asset_id":"big5.en.w2.workplace_relationship_copy","unit":"workplace_relationship_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"workplace":{"title":"At work","body":"Your tendencies may shape how you plan, communicate, respond to change, and manage stimulation. Role expectations and team norms can strengthen or soften the pattern.","prompt":"Which working conditions help you contribute consistently, and which require deliberate adjustment?"},"relationships":{"title":"In relationships","body":"The same tendency may be helpful in one interaction and difficult in another. Consider communication habits, boundaries, repair, and the other person's context rather than ranking one style above another.","prompt":"What helps you stay clear and considerate when your preferences differ?"},"boundary":"This content does not predict job performance, determine employment decisions, rate relationship quality, or guarantee outcomes."}} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json index 102630395..9c22e3146 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json @@ -3,8 +3,11 @@ "asset_count": 16, "unique_asset_id_count": 16, "unique_unit_count": 16, + "source_inventory_row_count": 118, + "unique_source_inventory_row_id_count": 118, "duplicate_asset_ids": [], "duplicate_units": [], + "duplicate_source_inventory_row_ids": [], "exact_duplicate_content_hashes": [], "decision": "PASS" } diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json new file mode 100644 index 000000000..494da9037 --- /dev/null +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json @@ -0,0 +1,141 @@ +{ + "schema_version": "fermatmind.big5.en_parity.inventory_row_reconciliation.v1", + "source_inventory_package_sha256": "0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292", + "source_inventory_ledger_sha256": "facbf57a362a430cdc8b5f6545db4a227e1268d285e2c27beed3c935ea9cf6e2", + "source_row_id_set_sha256": "347bd92a3db93d873b44e27c88327e860ee5915e9e7eafb9adb2227e75fef8b7", + "source_row_count": 118, + "cohort_counts": { + "public_profile_control": 52, + "english_historical_revision_verification": 50, + "result_content": 16 + }, + "public_profile_control_rows": [ + "W2-PUBLIC-domain-agreeableness", + "W2-PUBLIC-domain-conscientiousness", + "W2-PUBLIC-domain-extraversion", + "W2-PUBLIC-domain-neuroticism", + "W2-PUBLIC-domain-openness", + "W2-PUBLIC-facet_detail-achievement-striving", + "W2-PUBLIC-facet_detail-actions", + "W2-PUBLIC-facet_detail-activity", + "W2-PUBLIC-facet_detail-aesthetics", + "W2-PUBLIC-facet_detail-altruism", + "W2-PUBLIC-facet_detail-anger", + "W2-PUBLIC-facet_detail-anxiety", + "W2-PUBLIC-facet_detail-assertiveness", + "W2-PUBLIC-facet_detail-competence", + "W2-PUBLIC-facet_detail-compliance", + "W2-PUBLIC-facet_detail-deliberation", + "W2-PUBLIC-facet_detail-depression", + "W2-PUBLIC-facet_detail-dutifulness", + "W2-PUBLIC-facet_detail-excitement-seeking", + "W2-PUBLIC-facet_detail-feelings", + "W2-PUBLIC-facet_detail-gregariousness", + "W2-PUBLIC-facet_detail-ideas", + "W2-PUBLIC-facet_detail-imagination", + "W2-PUBLIC-facet_detail-impulsiveness", + "W2-PUBLIC-facet_detail-modesty", + "W2-PUBLIC-facet_detail-order", + "W2-PUBLIC-facet_detail-positive-emotions", + "W2-PUBLIC-facet_detail-self-consciousness", + "W2-PUBLIC-facet_detail-self-discipline", + "W2-PUBLIC-facet_detail-straightforwardness", + "W2-PUBLIC-facet_detail-tender-mindedness", + "W2-PUBLIC-facet_detail-trust", + "W2-PUBLIC-facet_detail-values", + "W2-PUBLIC-facet_detail-vulnerability", + "W2-PUBLIC-facet_detail-warmth", + "W2-PUBLIC-facet_hub-facets", + "W2-PUBLIC-hub-big-five", + "W2-PUBLIC-polarity-agreeableness-high", + "W2-PUBLIC-polarity-agreeableness-low", + "W2-PUBLIC-polarity-agreeableness-mid", + "W2-PUBLIC-polarity-conscientiousness-high", + "W2-PUBLIC-polarity-conscientiousness-low", + "W2-PUBLIC-polarity-conscientiousness-mid", + "W2-PUBLIC-polarity-extraversion-high", + "W2-PUBLIC-polarity-extraversion-low", + "W2-PUBLIC-polarity-extraversion-mid", + "W2-PUBLIC-polarity-neuroticism-high", + "W2-PUBLIC-polarity-neuroticism-low", + "W2-PUBLIC-polarity-neuroticism-mid", + "W2-PUBLIC-polarity-openness-high", + "W2-PUBLIC-polarity-openness-low", + "W2-PUBLIC-polarity-openness-mid" + ], + "english_historical_revision_rows": [ + "W2-DRAFT-SLOT-domain-agreeableness", + "W2-DRAFT-SLOT-domain-conscientiousness", + "W2-DRAFT-SLOT-domain-extraversion", + "W2-DRAFT-SLOT-domain-neuroticism", + "W2-DRAFT-SLOT-domain-openness", + "W2-DRAFT-SLOT-polarity-agreeableness-high", + "W2-DRAFT-SLOT-polarity-agreeableness-mid", + "W2-DRAFT-SLOT-polarity-agreeableness-low", + "W2-DRAFT-SLOT-polarity-conscientiousness-high", + "W2-DRAFT-SLOT-polarity-conscientiousness-mid", + "W2-DRAFT-SLOT-polarity-conscientiousness-low", + "W2-DRAFT-SLOT-polarity-extraversion-high", + "W2-DRAFT-SLOT-polarity-extraversion-mid", + "W2-DRAFT-SLOT-polarity-extraversion-low", + "W2-DRAFT-SLOT-polarity-neuroticism-high", + "W2-DRAFT-SLOT-polarity-neuroticism-mid", + "W2-DRAFT-SLOT-polarity-neuroticism-low", + "W2-DRAFT-SLOT-polarity-openness-high", + "W2-DRAFT-SLOT-polarity-openness-mid", + "W2-DRAFT-SLOT-polarity-openness-low", + "W2-DRAFT-SLOT-facet_detail-achievement-striving", + "W2-DRAFT-SLOT-facet_detail-actions", + "W2-DRAFT-SLOT-facet_detail-activity", + "W2-DRAFT-SLOT-facet_detail-aesthetics", + "W2-DRAFT-SLOT-facet_detail-altruism", + "W2-DRAFT-SLOT-facet_detail-anger", + "W2-DRAFT-SLOT-facet_detail-anxiety", + "W2-DRAFT-SLOT-facet_detail-assertiveness", + "W2-DRAFT-SLOT-facet_detail-competence", + "W2-DRAFT-SLOT-facet_detail-compliance", + "W2-DRAFT-SLOT-facet_detail-deliberation", + "W2-DRAFT-SLOT-facet_detail-depression", + "W2-DRAFT-SLOT-facet_detail-dutifulness", + "W2-DRAFT-SLOT-facet_detail-excitement-seeking", + "W2-DRAFT-SLOT-facet_detail-feelings", + "W2-DRAFT-SLOT-facet_detail-gregariousness", + "W2-DRAFT-SLOT-facet_detail-ideas", + "W2-DRAFT-SLOT-facet_detail-imagination", + "W2-DRAFT-SLOT-facet_detail-impulsiveness", + "W2-DRAFT-SLOT-facet_detail-modesty", + "W2-DRAFT-SLOT-facet_detail-order", + "W2-DRAFT-SLOT-facet_detail-positive-emotions", + "W2-DRAFT-SLOT-facet_detail-self-consciousness", + "W2-DRAFT-SLOT-facet_detail-self-discipline", + "W2-DRAFT-SLOT-facet_detail-straightforwardness", + "W2-DRAFT-SLOT-facet_detail-tender-mindedness", + "W2-DRAFT-SLOT-facet_detail-trust", + "W2-DRAFT-SLOT-facet_detail-values", + "W2-DRAFT-SLOT-facet_detail-vulnerability", + "W2-DRAFT-SLOT-facet_detail-warmth" + ], + "result_content_rows": [ + {"row_id":"W2-RESULT-free_preview","unit":"free_preview","stable_asset_identity":"big5.result_content.free_preview","translation_identity":"big5-result:free_preview:zh-CN:en","asset_id":"big5.en.w2.free_preview","required_content_keys":["title","body","bullets"]}, + {"row_id":"W2-RESULT-locked_result","unit":"locked_result","stable_asset_identity":"big5.result_content.locked_result","translation_identity":"big5-result:locked_result:zh-CN:en","asset_id":"big5.en.w2.locked_result","required_content_keys":["title","body","cta"]}, + {"row_id":"W2-RESULT-paid_full_report","unit":"paid_full_report","stable_asset_identity":"big5.result_content.paid_full_report","translation_identity":"big5-result:paid_full_report:zh-CN:en","asset_id":"big5.en.w2.paid_full_report","required_content_keys":["title","intro","section_intro","closing"]}, + {"row_id":"W2-RESULT-entitlement_levels","unit":"entitlement_levels","stable_asset_identity":"big5.result_content.entitlement_levels","translation_identity":"big5-result:entitlement_levels:zh-CN:en","asset_id":"big5.en.w2.entitlement_levels","required_content_keys":["levels","boundary"],"required_item_identities":{"levels.key":["preview","core","full"]}}, + {"row_id":"W2-RESULT-five_dimension_explanations","unit":"five_dimension_explanations","stable_asset_identity":"big5.result_content.five_dimension_explanations","translation_identity":"big5-result:five_dimension_explanations:zh-CN:en","asset_id":"big5.en.w2.five_dimension_explanations","required_content_keys":["dimensions"],"required_item_identities":{"dimensions.code":["O","C","E","A","N"]}}, + {"row_id":"W2-RESULT-facet_subscale_explanations","unit":"facet_subscale_explanations","stable_asset_identity":"big5.result_content.facet_subscale_explanations","translation_identity":"big5-result:facet_subscale_explanations:zh-CN:en","asset_id":"big5.en.w2.facet_subscale_explanations","required_content_keys":["intro","facets"],"required_item_identities":{"facets.code":["O1","O2","O3","O4","O5","O6","C1","C2","C3","C4","C5","C6","E1","E2","E3","E4","E5","E6","A1","A2","A3","A4","A5","A6","N1","N2","N3","N4","N5","N6"]}}, + {"row_id":"W2-RESULT-score_range_boundary_copy","unit":"score_range_boundary_copy","stable_asset_identity":"big5.result_content.score_range_boundary_copy","translation_identity":"big5-result:score_range_boundary_copy:zh-CN:en","asset_id":"big5.en.w2.score_range_boundary_copy","required_content_keys":["intro","ranges","boundary"],"required_item_identities":{"ranges.key":["lower","middle","higher"]}}, + {"row_id":"W2-RESULT-action_growth_advice","unit":"action_growth_advice","stable_asset_identity":"big5.result_content.action_growth_advice","translation_identity":"big5-result:action_growth_advice:zh-CN:en","asset_id":"big5.en.w2.action_growth_advice","required_content_keys":["title","actions","boundary"],"required_item_identities":{"actions.context":["awareness","flexibility","environment","review"]}}, + {"row_id":"W2-RESULT-workplace_relationship_copy","unit":"workplace_relationship_copy","stable_asset_identity":"big5.result_content.workplace_relationship_copy","translation_identity":"big5-result:workplace_relationship_copy:zh-CN:en","asset_id":"big5.en.w2.workplace_relationship_copy","required_content_keys":["workplace","relationships","boundary"]}, + {"row_id":"W2-RESULT-share_public_summary","unit":"share_public_summary","stable_asset_identity":"big5.result_content.share_public_summary","translation_identity":"big5-result:share_public_summary:zh-CN:en","asset_id":"big5.en.w2.share_public_summary","required_content_keys":["title","summary","privacy_note","allowed_fields"],"required_item_identities":{"allowed_fields":["title","summary","privacy_note"]}}, + {"row_id":"W2-RESULT-pdf_reader_content","unit":"pdf_reader_content","stable_asset_identity":"big5.result_content.pdf_reader_content","translation_identity":"big5-result:pdf_reader_content:zh-CN:en","asset_id":"big5.en.w2.pdf_reader_content","required_content_keys":["cover_title","reader_note","method_note","footer","public_url_allowed","indexable"]}, + {"row_id":"W2-RESULT-history_account_reentry","unit":"history_account_reentry","stable_asset_identity":"big5.result_content.history_account_reentry","translation_identity":"big5-result:history_account_reentry:zh-CN:en","asset_id":"big5.en.w2.history_account_reentry","required_content_keys":["history_title","history_body","reentry_cta","missing_state","privacy_note"]}, + {"row_id":"W2-RESULT-result_report_cta","unit":"result_report_cta","stable_asset_identity":"big5.result_content.result_report_cta","translation_identity":"big5-result:result_report_cta:zh-CN:en","asset_id":"big5.en.w2.result_report_cta","required_content_keys":["ctas","boundary"],"required_item_identities":{"ctas.key":["explore_dimensions","review_facets","try_reflection","return_history"]}}, + {"row_id":"W2-RESULT-empty_error_expired_access_denied","unit":"empty_error_expired_access_denied","stable_asset_identity":"big5.result_content.empty_error_expired_access_denied","translation_identity":"big5-result:empty_error_expired_access_denied:zh-CN:en","asset_id":"big5.en.w2.empty_error_expired_access_denied","required_content_keys":["states","fail_closed"],"required_item_identities":{"states.key":["empty","error","expired","access_denied"]}}, + {"row_id":"W2-RESULT-mobile_desktop_consumption","unit":"mobile_desktop_consumption","stable_asset_identity":"big5.result_content.mobile_desktop_consumption","translation_identity":"big5-result:mobile_desktop_consumption:zh-CN:en","asset_id":"big5.en.w2.mobile_desktop_consumption","required_content_keys":["shared_reader_copy","mobile_guidance","desktop_guidance","boundary"]}, + {"row_id":"W2-RESULT-analytics_reader_labels","unit":"analytics_reader_labels","stable_asset_identity":"big5.result_content.analytics_reader_labels","translation_identity":"big5-result:analytics_reader_labels:zh-CN:en","asset_id":"big5.en.w2.analytics_reader_labels","required_content_keys":["section_label","reader_notice","events","internal_metric_ids","personal_result_fields","boundary"],"required_item_identities":{"events.key":["section_opened","reflection_started","reflection_completed","report_returned"],"internal_metric_ids":[],"personal_result_fields":[]}} + ], + "dispositions": { + "public_profile_control": "preserved_completed_control_not_modified", + "english_historical_revision_verification": "preserved_reconciled_history_not_modified", + "result_content": "mapped_to_draft_review_asset" + } +} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json index 6acd191b9..d0f4b1b1b 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json @@ -18,6 +18,15 @@ "pr_number": 1866, "merge_sha": "897490e4baa31fe197ee50c89f0c3fae6bac408d", "inventory_package_sha256": "0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292", + "source_ledger_sha256": "facbf57a362a430cdc8b5f6545db4a227e1268d285e2c27beed3c935ea9cf6e2", + "row_id_set_sha256": "347bd92a3db93d873b44e27c88327e860ee5915e9e7eafb9adb2227e75fef8b7", + "row_count": 118, + "cohort_counts": { + "public_profile_control": 52, + "english_historical_revision_verification": 50, + "result_content": 16 + }, + "row_reconciliation_file": "inventory_row_reconciliation.json", "candidate_status": "inventory_frozen" }, "inventory_units": [ diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json index 1970d2b94..01fa9c284 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -2,16 +2,17 @@ "schema_version": "fermatmind.big5.en_parity.sha256_manifest.v1", "package_id": "BIG5-OCEAN-EN-PARITY-W2-RESULT-CONTENT-V1", "files": [ - {"path":"package_manifest.json","sha256":"1f7af6c284d3034380bf23718b7f00f926e0e3daa7af34e792616e37bc5f0ade"}, - {"path":"source_ledger.json","sha256":"a6d29ee8c6dbb1841dec21b5b735c8ade800509a3b85bdd8c52fc812e7d756ba"}, + {"path":"package_manifest.json","sha256":"03e4864904f7ecec26822a65475d3183f8aa3edbaf70e41547fbc54cb6d4f5eb"}, + {"path":"source_ledger.json","sha256":"0e9fe6d9f600e10792ff02c2b88dabfbfc704c7674ac9b77feb1c948fbd5ca99"}, + {"path":"inventory_row_reconciliation.json","sha256":"5736adb3c5f6c900be9151ef28fab828fc8c80a922b992f4db67d77de532105a"}, {"path":"translation_map.json","sha256":"d2cab97371f0392f647b5c057365ebf7001ecca7cd7b10cd6a172202fe4c965d"}, {"path":"claim_boundary_report.json","sha256":"13edb5670dc2e13b91e297184fb7787e665378af9c72c0199bb44175566deab8"}, - {"path":"content_assets.jsonl","sha256":"0e350d0fb2711b4dd52685a41cebcbd718eebc98421735144b3d64cfe1848780"}, - {"path":"surface_coverage.json","sha256":"88e1141dc13350ab823e1815d8752ef5e110dcffaacdeace1038b5b0133ef476"}, - {"path":"duplicate_report.json","sha256":"927e21140f2835a0e959f93da9f2e758553c591121840f5ec1bb451fb2f52a26"}, + {"path":"content_assets.jsonl","sha256":"45e827319938bb99088d93697ec5fcbd0f342fb8d2aabe3034bd92aba2f4d2f3"}, + {"path":"surface_coverage.json","sha256":"27e9eebc8184d75a4b6d69a2f9288b17bcf9164ebf301c7a17eb7962cea98b92"}, + {"path":"duplicate_report.json","sha256":"743df9149508a4a3c6afbc6f7259cc4435cd7b7ea215fcdc1a5cc0707d641f0d"}, {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, - {"path":"README.md","sha256":"f23c269d5b6f17079cd1263232c7f07a17285ef4c76df86d4640ae77ea9c3d85"}, - {"path":"validate_package.php","sha256":"178c33561607027cd4e90d2884fd7c50ce634afdbbac28ac075892f81e0cc720"} + {"path":"README.md","sha256":"fed2fffc406ce47e63f251ab50a63f843145779efb03709b9656b3202f9b0a8a"}, + {"path":"validate_package.php","sha256":"217e0063caf924e82a767f820fb55522252207476c0ab50b6dcc0e4cb52443b6"} ], - "package_sha256": "76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851" + "package_sha256": "b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c" } diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json index 140af9ec0..c53923721 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json @@ -2,6 +2,17 @@ "schema_version": "fermatmind.big5.en_parity.result_content_source_ledger.v1", "package_id": "BIG5-OCEAN-EN-PARITY-W2-RESULT-CONTENT-V1", "source_inventory_sha256": "0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292", + "source_inventory_ledger_sha256": "facbf57a362a430cdc8b5f6545db4a227e1268d285e2c27beed3c935ea9cf6e2", + "inventory_row_reconciliation": { + "file": "inventory_row_reconciliation.json", + "row_count": 118, + "row_id_set_sha256": "347bd92a3db93d873b44e27c88327e860ee5915e9e7eafb9adb2227e75fef8b7", + "cohort_counts": { + "public_profile_control": 52, + "english_historical_revision_verification": 50, + "result_content": 16 + } + }, "shared_claim_map": "big5-continuous-contextual-nondiagnostic-v1", "entries": [ {"unit":"free_preview","translation_identity":"big5-result:free_preview:zh-CN:en","source_authority":"W2-RESULT-free_preview","asset_id":"big5.en.w2.free_preview"}, diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json index 613de4698..084a66618 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json @@ -2,6 +2,15 @@ "schema_version": "fermatmind.big5.en_parity.surface_coverage.v1", "expected_unit_count": 16, "covered_unit_count": 16, + "source_row_coverage": { + "expected_row_count": 118, + "reconciled_row_count": 118, + "public_profile_control": 52, + "english_historical_revision_verification": 50, + "result_content": 16, + "missing_row_ids": [], + "duplicate_row_ids": [] + }, "missing_units": [], "duplicate_units": [], "coverage": [ diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php index 359702db7..35341e2ab 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php @@ -36,6 +36,24 @@ throw new RuntimeException('Frozen inventory units do not match.'); } +$expectedInventoryEvidence = [ + 'inventory_package_sha256' => '0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292', + 'source_ledger_sha256' => 'facbf57a362a430cdc8b5f6545db4a227e1268d285e2c27beed3c935ea9cf6e2', + 'row_id_set_sha256' => '347bd92a3db93d873b44e27c88327e860ee5915e9e7eafb9adb2227e75fef8b7', + 'row_count' => 118, + 'cohort_counts' => [ + 'public_profile_control' => 52, + 'english_historical_revision_verification' => 50, + 'result_content' => 16, + ], + 'row_reconciliation_file' => 'inventory_row_reconciliation.json', +]; +foreach ($expectedInventoryEvidence as $field => $expected) { + if (($manifest['source_inventory'][$field] ?? null) !== $expected) { + throw new RuntimeException("Frozen source inventory evidence does not match: {$field}"); + } +} + $assets = []; foreach (file($root.'/content_assets.jsonl', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ?: [] as $line) { $assets[] = json_decode($line, true, 512, JSON_THROW_ON_ERROR); @@ -51,6 +69,66 @@ throw new RuntimeException('Content asset IDs must be unique.'); } +$reconciliation = $decode($root.'/inventory_row_reconciliation.json'); +$publicRows = $reconciliation['public_profile_control_rows'] ?? []; +$historicalRows = $reconciliation['english_historical_revision_rows'] ?? []; +$resultRows = $reconciliation['result_content_rows'] ?? []; +$sourceRowIds = [ + ...$publicRows, + ...$historicalRows, + ...array_column($resultRows, 'row_id'), +]; +if ( + ($reconciliation['source_inventory_package_sha256'] ?? null) !== $expectedInventoryEvidence['inventory_package_sha256'] + || ($reconciliation['source_inventory_ledger_sha256'] ?? null) !== $expectedInventoryEvidence['source_ledger_sha256'] + || ($reconciliation['source_row_id_set_sha256'] ?? null) !== $expectedInventoryEvidence['row_id_set_sha256'] + || ($reconciliation['source_row_count'] ?? null) !== 118 + || ($reconciliation['cohort_counts'] ?? null) !== $expectedInventoryEvidence['cohort_counts'] + || count($publicRows) !== 52 + || count($historicalRows) !== 50 + || count($resultRows) !== 16 + || count($sourceRowIds) !== 118 + || count(array_unique($sourceRowIds)) !== 118 + || hash('sha256', implode("\n", $sourceRowIds)."\n") !== $expectedInventoryEvidence['row_id_set_sha256'] +) { + throw new RuntimeException('Frozen 118-row inventory reconciliation does not match.'); +} + +$assetsByUnit = array_column($assets, null, 'unit'); +foreach ($resultRows as $index => $row) { + $unit = $expectedUnits[$index]; + $asset = $assetsByUnit[$unit] ?? null; + if ( + ($row['row_id'] ?? null) !== 'W2-RESULT-'.$unit + || ($row['unit'] ?? null) !== $unit + || ($row['stable_asset_identity'] ?? null) !== 'big5.result_content.'.$unit + || ($row['translation_identity'] ?? null) !== 'big5-result:'.$unit.':zh-CN:en' + || ($row['asset_id'] ?? null) !== 'big5.en.w2.'.$unit + || ($asset['asset_id'] ?? null) !== ($row['asset_id'] ?? null) + ) { + throw new RuntimeException("Frozen result row mapping does not match: {$unit}"); + } + + $content = $asset['content'] ?? []; + foreach ($row['required_content_keys'] ?? [] as $key) { + if (! array_key_exists($key, $content)) { + throw new RuntimeException("Required content key is missing for {$unit}: {$key}"); + } + } + + foreach ($row['required_item_identities'] ?? [] as $path => $expectedIdentities) { + if (str_contains($path, '.')) { + [$collection, $identityKey] = explode('.', $path, 2); + $actualIdentities = array_column($content[$collection] ?? [], $identityKey); + } else { + $actualIdentities = $content[$path] ?? null; + } + if ($actualIdentities !== $expectedIdentities) { + throw new RuntimeException("Required item identities do not match for {$unit}: {$path}"); + } + } +} + $encodedAssets = json_encode($assets, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR); if (preg_match('/[\x{3400}-\x{9FFF}\x{F900}-\x{FAFF}]/u', $encodedAssets) === 1) { throw new RuntimeException('CJK leakage detected.'); diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md index a5ac79d13..3f0ab707a 100644 --- a/backend/docs/seo/en-parity-w2-big-five-result-assets.md +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -6,11 +6,13 @@ The package contains natural English reader copy for previews, locked and full reports, entitlements, five dimensions, 30 facets, score-range boundaries, practical reflection, workplace and relationship context, public-safe sharing, private PDF/history use, calls to action, fail-closed states, cross-device reading, and reader-facing analytics labels. +It also reconciles every row in the immutable 118-row source inventory: 52 completed public-profile controls and 50 historical revision rows remain preserved and unmodified, while all 16 result-content rows map to exact draft asset IDs, content keys, and nested item identities. + ## Exact lineage - Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` -- Result content package SHA-256: `76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851` +- Result content package SHA-256: `b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c` ## Boundaries diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json index d45ae9df8..0d2782c37 100644 --- a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -6,11 +6,19 @@ "pr_number": 1866, "merge_sha": "897490e4baa31fe197ee50c89f0c3fae6bac408d", "package_sha256": "0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292", + "source_ledger_sha256": "facbf57a362a430cdc8b5f6545db4a227e1268d285e2c27beed3c935ea9cf6e2", + "row_id_set_sha256": "347bd92a3db93d873b44e27c88327e860ee5915e9e7eafb9adb2227e75fef8b7", + "row_count": 118, + "cohort_counts": { + "public_profile_control": 52, + "english_historical_revision_verification": 50, + "result_content": 16 + }, "status": "inventory_frozen" }, "output_package": { "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", - "package_sha256": "76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851", + "package_sha256": "b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c", "inventory_unit_count": 16, "covered_unit_count": 16, "asset_group_count": 16, @@ -20,6 +28,8 @@ }, "validation": { "exact_units": "PASS", + "exact_118_source_rows": "PASS", + "result_row_required_keys": "PASS", "unique_traceability": "PASS", "english_complete": "PASS", "cjk_leakage": 0, diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php index c40ff8c03..31c880ef6 100644 --- a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -52,6 +52,66 @@ public function it_covers_the_frozen_inventory_exactly_once(): void $this->assertSame([], $coverage['duplicate_units']); } + #[Test] + public function it_reconciles_all_118_frozen_source_rows_and_required_result_keys(): void + { + $manifest = $this->loadJson('package_manifest.json'); + $ledger = $this->loadJson('source_ledger.json'); + $reconciliation = $this->loadJson('inventory_row_reconciliation.json'); + $assetsByUnit = array_column($this->assets(), null, 'unit'); + $expectedCounts = [ + 'public_profile_control' => 52, + 'english_historical_revision_verification' => 50, + 'result_content' => 16, + ]; + + $this->assertSame(118, $manifest['source_inventory']['row_count']); + $this->assertSame($expectedCounts, $manifest['source_inventory']['cohort_counts']); + $this->assertSame('inventory_row_reconciliation.json', $manifest['source_inventory']['row_reconciliation_file']); + $this->assertSame(118, $ledger['inventory_row_reconciliation']['row_count']); + $this->assertSame($expectedCounts, $ledger['inventory_row_reconciliation']['cohort_counts']); + $this->assertSame(52, count($reconciliation['public_profile_control_rows'])); + $this->assertSame(50, count($reconciliation['english_historical_revision_rows'])); + $this->assertSame(16, count($reconciliation['result_content_rows'])); + + $sourceRowIds = [ + ...$reconciliation['public_profile_control_rows'], + ...$reconciliation['english_historical_revision_rows'], + ...array_column($reconciliation['result_content_rows'], 'row_id'), + ]; + $this->assertCount(118, $sourceRowIds); + $this->assertCount(118, array_unique($sourceRowIds)); + $this->assertSame( + '347bd92a3db93d873b44e27c88327e860ee5915e9e7eafb9adb2227e75fef8b7', + hash('sha256', implode("\n", $sourceRowIds)."\n") + ); + + foreach ($reconciliation['result_content_rows'] as $index => $row) { + $unit = self::UNITS[$index]; + $asset = $assetsByUnit[$unit]; + + $this->assertSame('W2-RESULT-'.$unit, $row['row_id']); + $this->assertSame($unit, $row['unit']); + $this->assertSame('big5.result_content.'.$unit, $row['stable_asset_identity']); + $this->assertSame('big5-result:'.$unit.':zh-CN:en', $row['translation_identity']); + $this->assertSame($asset['asset_id'], $row['asset_id']); + + foreach ($row['required_content_keys'] as $key) { + $this->assertArrayHasKey($key, $asset['content'], "{$unit}.{$key}"); + } + + foreach ($row['required_item_identities'] ?? [] as $path => $expectedIdentities) { + if (str_contains($path, '.')) { + [$collection, $identityKey] = explode('.', $path, 2); + $actualIdentities = array_column($asset['content'][$collection], $identityKey); + } else { + $actualIdentities = $asset['content'][$path]; + } + $this->assertSame($expectedIdentities, $actualIdentities, "{$unit}.{$path}"); + } + } + } + #[Test] public function it_keeps_every_asset_draft_only_and_every_permission_false(): void { @@ -147,6 +207,22 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar $this->assertSame('Delayed-Feedback Persistence', $c5['label']); $this->assertStringContainsString('keep making progress', $c5['description']); $this->assertStringContainsString('feedback or reward is not immediate', $c5['description']); + $a4 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'A4' + ))[0]; + $this->assertSame('Conflict Mediation', $a4['label']); + $this->assertStringContainsString('maintain the relationship', $a4['description']); + $this->assertStringContainsString('yield when useful', $a4['description']); + $this->assertStringContainsString('prevent escalation', $a4['description']); + $n2 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'N2' + ))[0]; + $this->assertSame('Anger Activation', $n2['label']); + $this->assertStringContainsString('internal anger or resistance', $n2['description']); + $this->assertStringContainsString('obstructed, misunderstood', $n2['description']); + $this->assertStringContainsString('boundary is violated', $n2['description']); $n3 = array_values(array_filter( $byUnit['facet_subscale_explanations']['facets'], static fn (array $facet): bool => $facet['code'] === 'N3' @@ -188,7 +264,7 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void hash('sha256', implode("\n", $canonical)) ); $this->assertSame( - '76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851', + 'b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c', $shaManifest['package_sha256'] ); } diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index d3fa6e2a4..61470dabc 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102419,7 +102419,7 @@ }, "local_validation": { "status": "pass", - "evidence": "Package validator passes twice byte-identically with SHA 76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851. Focused package PHPUnit passes 6 tests / 253 assertions; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + "evidence": "Package validator passes twice byte-identically with SHA b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c. Focused package PHPUnit passes 7 tests / 433 assertions with exact 118-row reconciliation and required-key coverage; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { "status": "pending", @@ -102484,8 +102484,13 @@ "at": "2026-07-31T06:33:53Z", "status": "review_fix_local_checks_passed", "note": "Exact-head review on f72ca150846d4d31072cc6866200c23c8764aa57 identified one remaining C5 semantic drift. C5 now preserves the pinned source authority's continued progress without immediate feedback or reward, with three focused semantic assertions. The byte-exact package was rebuilt as 76c547083230ae57c7028037bfb50623bdfd7cf007335166ac01abde1cf66851. Validator passes twice identically; package suite passes 6 tests / 253 assertions, content suite passes 4 tests / 62 assertions, and Pint, parsers, diff, and exact 17-path scope validation pass." + }, + { + "at": "2026-07-31T06:48:30Z", + "status": "review_fix_local_checks_passed", + "note": "Exact-head review on 675e96810e1c2359c67cf07edfdf9e5ce6b6fe81 identified three current-scope gaps. Added fail-closed reconciliation for all 118 immutable source rows, pinned the source-ledger and ordered row-id-set hashes, preserved the 52/50 completed-control and historical cohorts, and mapped every one of the 16 result rows to an exact asset ID, required top-level keys, and nested item identities. A4 now preserves conflict mediation and de-escalation; N2 preserves anger/resistance activation under obstruction, misunderstanding, or boundary violation. Package SHA is b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c. Validator passes twice; package suite passes 7 tests / 433 assertions, runtime-freeze regression and content suite pass, and Pint, syntax, parsers, scans, diff, and exact allowlist validation pass." } ], - "updated_at": "2026-07-31T06:33:53Z" + "updated_at": "2026-07-31T06:48:30Z" } } From cf28114bff98d84d71cb72dfbec3bb1c60723830 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:49:19 +0800 Subject: [PATCH 15/20] chore(pr-train): bind inventory reconciliation repair --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 61470dabc..8b3986fac 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "8de88ef1bd5c6e81dccfe1852b78e01be3aedfb8", + "commit_sha": "42f37751365de60c9f1f9dd7e3682c79bedc98bd", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 semantic repair head 8de88ef1bd5c6e81dccfe1852b78e01be3aedfb8 requires fresh exact-head checks and review after the C5 correction." + "evidence": "PR 3451 reconciliation repair head 42f37751365de60c9f1f9dd7e3682c79bedc98bd requires fresh exact-head checks and review after the 118-row, A4, and N2 corrections." } }, "scope_validation": { From ecef0fbd2dc2b240350d12aebed04dd942974eda Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:58:21 +0800 Subject: [PATCH 16/20] fix(big-five): bind complete draft package file set --- .../w2_result_content_v1/sha256_manifest.json | 4 +-- .../w2_result_content_v1/validate_package.php | 12 ++++++++ .../en-parity-w2-big-five-result-assets.md | 2 +- ...n-parity-w2-big-five-result-assets.v1.json | 2 +- .../BigFiveEnglishResultAssetPackageTest.php | 14 ++++++++- ...BigFiveResultPageV2CoreBodyPreviewTest.php | 30 +++++++++++++++---- docs/codex/pr-train-state.json | 9 ++++-- 7 files changed, 61 insertions(+), 12 deletions(-) diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json index 01fa9c284..9207570e0 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -12,7 +12,7 @@ {"path":"duplicate_report.json","sha256":"743df9149508a4a3c6afbc6f7259cc4435cd7b7ea215fcdc1a5cc0707d641f0d"}, {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, {"path":"README.md","sha256":"fed2fffc406ce47e63f251ab50a63f843145779efb03709b9656b3202f9b0a8a"}, - {"path":"validate_package.php","sha256":"217e0063caf924e82a767f820fb55522252207476c0ab50b6dcc0e4cb52443b6"} + {"path":"validate_package.php","sha256":"1eac658d0df335a4556fe2c0da3aefa3f0de1420bb02b3555e5cd5afcf6411c5"} ], - "package_sha256": "b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c" + "package_sha256": "47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4" } diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php index 35341e2ab..f0bcae07e 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php @@ -189,6 +189,18 @@ } $shaManifest = $decode($root.'/sha256_manifest.json'); +$manifestedPackageFiles = array_column($shaManifest['files'] ?? [], 'path'); +$expectedPackageFiles = [...$manifestedPackageFiles, 'sha256_manifest.json']; +$actualPackageFiles = array_values(array_filter( + scandir($root) ?: [], + static fn (string $file): bool => $file !== '.' && $file !== '..' && is_file($root.'/'.$file) +)); +sort($expectedPackageFiles); +sort($actualPackageFiles); +if ($actualPackageFiles !== $expectedPackageFiles) { + throw new RuntimeException('Package directory contains missing or unmanifested files.'); +} + $canonical = []; foreach ($shaManifest['files'] ?? [] as $file) { $path = $root.'/'.$file['path']; diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md index 3f0ab707a..afb1a5e3e 100644 --- a/backend/docs/seo/en-parity-w2-big-five-result-assets.md +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -12,7 +12,7 @@ It also reconciles every row in the immutable 118-row source inventory: 52 compl - Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` -- Result content package SHA-256: `b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c` +- Result content package SHA-256: `47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4` ## Boundaries diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json index 0d2782c37..b6b5565cf 100644 --- a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -18,7 +18,7 @@ }, "output_package": { "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", - "package_sha256": "b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c", + "package_sha256": "47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4", "inventory_unit_count": 16, "covered_unit_count": 16, "asset_group_count": 16, diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php index 31c880ef6..dcd0e956e 100644 --- a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -251,6 +251,18 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar public function it_has_a_deterministic_byte_exact_sha_manifest(): void { $shaManifest = $this->loadJson('sha256_manifest.json'); + $expectedPackageFiles = [ + ...array_column($shaManifest['files'], 'path'), + 'sha256_manifest.json', + ]; + $actualPackageFiles = array_map( + 'basename', + glob($this->path('*')) ?: [] + ); + sort($expectedPackageFiles); + sort($actualPackageFiles); + $this->assertSame($expectedPackageFiles, $actualPackageFiles); + $canonical = []; foreach ($shaManifest['files'] as $file) { @@ -264,7 +276,7 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void hash('sha256', implode("\n", $canonical)) ); $this->assertSame( - 'b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c', + '47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4', $shaManifest['package_sha256'] ); } diff --git a/backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php b/backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php index 97814cd2e..dc512cdf6 100644 --- a/backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php +++ b/backend/tests/Unit/Services/BigFive/ResultPageV2/BigFiveResultPageV2CoreBodyPreviewTest.php @@ -6190,11 +6190,21 @@ public function test_runtime_freeze_classifier_ignores_bigfive_v2_en_parity_draf public function test_runtime_freeze_classifier_ignores_w2_en_parity_result_draft_package(): void { $allowed = [ - 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/claim_boundary_report.json', 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/editorial_self_review.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/translation_map.json', 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php', ]; $blocked = [ + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/unreviewed_runtime_payload.json', 'backend/content_packs/BIG5_OCEAN/v2/registry/shared/trait_labels.json', 'backend/app/Services/BigFive/ResultPageV2/BigFiveResultPageV2Service.php', ]; @@ -11917,10 +11927,20 @@ private function isBigFiveV2EnParityDraftCatalogFile(string $file): bool private function isBigFiveW2EnParityResultDraftPackageFile(string $file): bool { - return str_starts_with( - $file, - 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/' - ); + return in_array($file, [ + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/claim_boundary_report.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/duplicate_report.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/editorial_self_review.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/package_manifest.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/source_ledger.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/surface_coverage.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/translation_map.json', + 'backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php', + ], true); } private function isBigFiveEnglishDraftInventoryFile(string $file): bool diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 8b3986fac..24b88e16d 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102419,7 +102419,7 @@ }, "local_validation": { "status": "pass", - "evidence": "Package validator passes twice byte-identically with SHA b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c. Focused package PHPUnit passes 7 tests / 433 assertions with exact 118-row reconciliation and required-key coverage; runtime-freeze scope regression passes 2 tests / 6 assertions; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + "evidence": "Package validator passes twice byte-identically with SHA 47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4. Focused package PHPUnit passes 7 tests / 434 assertions with exact 118-row reconciliation, required-key coverage, and complete package-file binding; runtime-freeze explicit-file regression passes 2 tests / 6 assertions with unknown package paths blocked; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { "status": "pending", @@ -102489,8 +102489,13 @@ "at": "2026-07-31T06:48:30Z", "status": "review_fix_local_checks_passed", "note": "Exact-head review on 675e96810e1c2359c67cf07edfdf9e5ce6b6fe81 identified three current-scope gaps. Added fail-closed reconciliation for all 118 immutable source rows, pinned the source-ledger and ordered row-id-set hashes, preserved the 52/50 completed-control and historical cohorts, and mapped every one of the 16 result rows to an exact asset ID, required top-level keys, and nested item identities. A4 now preserves conflict mediation and de-escalation; N2 preserves anger/resistance activation under obstruction, misunderstanding, or boundary violation. Package SHA is b6676eff4e63f257a7a460f5c79114f79ce23bc5cd54ccaf06ff835d5c635e6c. Validator passes twice; package suite passes 7 tests / 433 assertions, runtime-freeze regression and content suite pass, and Pint, syntax, parsers, scans, diff, and exact allowlist validation pass." + }, + { + "at": "2026-07-31T06:57:44Z", + "status": "review_fix_local_checks_passed", + "note": "Exact-head review on cf28114bff98d84d71cb72dfbec3bb1c60723830 identified two package-integrity gaps. The validator and focused test now require the actual package directory file set to equal every SHA-manifest entry plus sha256_manifest.json, so unbound extra files fail closed. The runtime-freeze exception now allowlists only the twelve reviewed draft-package files and blocks unknown future files under the same directory. Package SHA is 47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4. Validator passes twice; package suite passes 7 tests / 434 assertions, explicit classifier regression passes 2 tests / 6 assertions, content suite passes, and Pint, parsers, diff, and scope checks pass." } ], - "updated_at": "2026-07-31T06:48:30Z" + "updated_at": "2026-07-31T06:57:44Z" } } From 65b8cd1f09d16b03153a5a1468bd2567ac6e32b4 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 14:58:41 +0800 Subject: [PATCH 17/20] chore(pr-train): bind package integrity repair --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 24b88e16d..389d0e308 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "42f37751365de60c9f1f9dd7e3682c79bedc98bd", + "commit_sha": "ecef0fbd2dc2b240350d12aebed04dd942974eda", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 reconciliation repair head 42f37751365de60c9f1f9dd7e3682c79bedc98bd requires fresh exact-head checks and review after the 118-row, A4, and N2 corrections." + "evidence": "PR 3451 package-integrity repair head ecef0fbd2dc2b240350d12aebed04dd942974eda requires fresh exact-head checks and review after complete-file binding and explicit classifier allowlisting." } }, "scope_validation": { From be8e157199b43d0431dde0d3ccf1c6cb084aa1bf Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 15:09:37 +0800 Subject: [PATCH 18/20] fix(big-five): lock all facet source semantics --- .../en_parity/w2_result_content_v1/README.md | 1 + .../w2_result_content_v1/content_assets.jsonl | 2 +- .../inventory_row_reconciliation.json | 32 +++++++++++++++++++ .../w2_result_content_v1/sha256_manifest.json | 10 +++--- .../w2_result_content_v1/validate_package.php | 21 ++++++++++++ .../en-parity-w2-big-five-result-assets.md | 4 +-- ...n-parity-w2-big-five-result-assets.v1.json | 3 +- .../BigFiveEnglishResultAssetPackageTest.php | 32 ++++++++++++++++++- docs/codex/pr-train-state.json | 9 ++++-- 9 files changed, 102 insertions(+), 12 deletions(-) diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md index 7a2569066..39d704b71 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/README.md @@ -11,6 +11,7 @@ The package is a producer draft for manual review. It is not a runtime registry, - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` - Inventory source-ledger SHA-256: `facbf57a362a430cdc8b5f6545db4a227e1268d285e2c27beed3c935ea9cf6e2` - `inventory_row_reconciliation.json` preserves all 118 frozen row IDs: 52 completed public controls, 50 reconciled historical revisions, and 16 result-content rows mapped to exact draft asset IDs and required content/item keys. +- The same reconciliation binds source-aligned semantic anchors for all 30 facet codes; validation fails if any facet loses its pinned glossary meaning. ## Safety and authority diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl index f0cc37877..454d865e7 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/content_assets.jsonl @@ -3,7 +3,7 @@ {"asset_id":"big5.en.w2.paid_full_report","unit":"paid_full_report","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Your full Big Five report","intro":"Read the report as a set of working hypotheses. Each dimension describes a continuum, and the pattern may appear differently across work, relationships, stress, and unfamiliar situations.","section_intro":"Explore the five dimensions, the facets within them, and actions you may want to test. No single score defines your ability, character, or future.","closing":"Keep what is useful, question what does not fit, and revisit the result alongside real examples from your life."}} {"asset_id":"big5.en.w2.entitlement_levels","unit":"entitlement_levels","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"levels":[{"key":"preview","label":"Preview","description":"A short, private snapshot of selected tendencies."},{"key":"core","label":"Core result","description":"All five dimension ranges with concise explanations."},{"key":"full","label":"Full report","description":"Dimension and facet context, reflection prompts, and practical action ideas."}],"boundary":"Access levels describe available content only. They do not indicate result quality, certainty, or personal potential."}} {"asset_id":"big5.en.w2.five_dimension_explanations","unit":"five_dimension_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"dimensions":[{"code":"O","title":"Openness to Experience","body":"This dimension reflects how readily you may explore unfamiliar ideas, perspectives, aesthetics, and ways of doing things. Different contexts can call for curiosity, continuity, or a blend of both."},{"code":"C","title":"Conscientiousness","body":"This dimension reflects how you may organize effort, follow plans, and manage responsibilities. Structure can support reliability, while flexibility can help when priorities change."},{"code":"E","title":"Extraversion","body":"This dimension reflects how you may engage with social stimulation, activity, and outward expression. Quiet and energetic settings can each support different kinds of contribution."},{"code":"A","title":"Agreeableness","body":"This dimension reflects how you may balance cooperation, trust, candor, and personal boundaries. Effective interaction can involve both consideration and clear disagreement."},{"code":"N","title":"Emotional Sensitivity","body":"This dimension reflects how readily you may notice stress, threat, or emotional shifts. Sensitivity can provide early signals, while steadiness can support recovery; neither range determines resilience or worth."}]}} -{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Interest in possibilities, inner imagery, and alternative ways a situation could unfold."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Attention to form, beauty, design, and sensory qualities."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to vary routines and try unfamiliar activities."},{"code":"O5","label":"Intellectual Exploration","description":"Enjoyment of ideas, questions, and conceptual complexity."},{"code":"O6","label":"Value Flexibility","description":"Readiness to examine assumptions and consider other value frameworks."},{"code":"C1","label":"Self-Efficacy","description":"Tendency to approach tasks with a sense of practical capability."},{"code":"C2","label":"Order","description":"Preference for organization, predictability, and clear arrangements."},{"code":"C3","label":"Dutifulness","description":"Attention to commitments, obligations, and agreed standards."},{"code":"C4","label":"Achievement Striving","description":"Energy directed toward goals, progress, and demanding standards."},{"code":"C5","label":"Delayed-Feedback Persistence","description":"Ability to keep making progress when feedback or reward is not immediate."},{"code":"C6","label":"Deliberation","description":"Tendency to consider consequences before acting."},{"code":"E1","label":"Warmth","description":"Ease in expressing friendliness and interpersonal interest."},{"code":"E2","label":"Sociability","description":"Preference for frequent contact and shared activity."},{"code":"E3","label":"Assertiveness","description":"Readiness to speak up, guide discussion, or take social initiative."},{"code":"E4","label":"Activity Level","description":"Preference for pace, movement, and a full schedule."},{"code":"E5","label":"Excitement Seeking","description":"Interest in stimulation, novelty, and energetic experiences."},{"code":"E6","label":"Positive Emotion","description":"Readiness to experience and express enthusiasm or enjoyment."},{"code":"A1","label":"Trust","description":"Initial willingness to expect fair or cooperative intent from others."},{"code":"A2","label":"Straightforwardness","description":"Preference for direct, sincere, and uncomplicated communication."},{"code":"A3","label":"Altruism","description":"Readiness to notice and respond to other people's needs."},{"code":"A4","label":"Conflict Mediation","description":"Tendency during disagreement to maintain the relationship, yield when useful, and prevent escalation."},{"code":"A5","label":"Modesty","description":"Comfort with sharing credit and limiting self-promotion."},{"code":"A6","label":"Compassion","description":"Sensitivity to vulnerability, hardship, and emotional impact."},{"code":"N1","label":"Anxiety Sensitivity","description":"Readiness to detect uncertainty, risk, or possible problems."},{"code":"N2","label":"Anger Activation","description":"Readiness for internal anger or resistance when obstructed, misunderstood, or when a boundary is violated."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Self-Consciousness","description":"Sensitivity to evaluation and how you may appear to others."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Coping-Limit Vulnerability","description":"Tendency to reach visible coping limits more readily under high pressure, loss of control, or complex demands."}]}} +{"asset_id":"big5.en.w2.facet_subscale_explanations","unit":"facet_subscale_explanations","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Facets add detail within each broad dimension. They may vary independently, so a broad range does not require every facet to look the same.","facets":[{"code":"O1","label":"Imagination","description":"Tendency to form inner associations and simulate possibilities beyond the information immediately in front of you."},{"code":"O2","label":"Aesthetic Sensitivity","description":"Sensitivity to form, atmosphere, rhythm, and the texture of details."},{"code":"O3","label":"Emotional Receptivity","description":"Willingness to identify, approach, and express inner feelings, and to use them as information rather than set them aside."},{"code":"O4","label":"Openness to Action","description":"Willingness to use new methods, routes, and experiences to test and revise your approach."},{"code":"O5","label":"Intellectual Exploration","description":"Interest in abstract concepts, system relationships, and explanatory frameworks."},{"code":"O6","label":"Value Flexibility","description":"Readiness to reconsider established rules, traditional positions, and value boundaries."},{"code":"C1","label":"Self-Efficacy","description":"Basic confidence that you can handle tasks, understand requirements, and solve problems."},{"code":"C2","label":"Order","description":"Need for structure, neatness, plans, and predictable arrangements."},{"code":"C3","label":"Dutifulness","description":"Tendency to place commitments, rules, and duties consistently near the front of decisions."},{"code":"C4","label":"Achievement Striving","description":"Drive toward goals, demanding standards, and improving the level of completion."},{"code":"C5","label":"Delayed-Feedback Persistence","description":"Ability to keep making progress when feedback or reward is not immediate."},{"code":"C6","label":"Deliberation","description":"Tendency to assess risks, consequences, and steps before acting."},{"code":"E1","label":"Warmth","description":"Tendency to convey goodwill, closeness, and approachability in one-to-one interactions."},{"code":"E2","label":"Group Participation","description":"Preference for multi-person settings, lively interaction, and social density, including drawing energy from groups."},{"code":"E3","label":"Assertiveness","description":"Readiness to occupy an expressive position, state requests, and influence how a group situation develops."},{"code":"E4","label":"Activity Level","description":"Preferred life speed, task density, and level of physical energy."},{"code":"E5","label":"Excitement Seeking","description":"Need for novel, intense, and high-arousal experiences."},{"code":"E6","label":"Positive Emotion","description":"Frequency of naturally experiencing and expressing lightness, excitement, and enjoyment."},{"code":"A1","label":"Trust","description":"Tendency to begin by treating other people's intentions as trustworthy and offering goodwill before demanding proof."},{"code":"A2","label":"Straightforwardness","description":"Tendency to express ideas directly, transparently, and with relatively little strategy."},{"code":"A3","label":"Altruism","description":"Tendency to include other people's circumstances, needs, and burdens naturally in your considerations."},{"code":"A4","label":"Conflict Mediation","description":"Tendency during disagreement to maintain the relationship, yield when useful, and prevent escalation."},{"code":"A5","label":"Modesty","description":"Willingness to reduce self-prominence and avoid placing yourself at the center."},{"code":"A6","label":"Compassion","description":"Sensitivity to other people's vulnerability, hardship, and emotional pain."},{"code":"N1","label":"Anxiety Sensitivity","description":"Degree of early alertness to risks, errors, and uncertain consequences."},{"code":"N2","label":"Anger Activation","description":"Readiness for internal anger or resistance when obstructed, misunderstood, or when a boundary is violated."},{"code":"N3","label":"Sustained-Stress Depletion","description":"Tendency, under sustained pressure, to become drained, fatigued, or short of the energy needed to keep responding."},{"code":"N4","label":"Social Self-Consciousness","description":"Tendency to feel discomfort, monitor yourself, or withdraw under other people's gaze, evaluation, or social exposure."},{"code":"N5","label":"Overload Exit Urge","description":"Tendency, when overloaded, to want to disconnect, withdraw, or change the situation immediately to reduce pressure."},{"code":"N6","label":"Coping-Limit Vulnerability","description":"Tendency to reach visible coping limits more readily under high pressure, loss of control, or complex demands."}]}} {"asset_id":"big5.en.w2.score_range_boundary_copy","unit":"score_range_boundary_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"intro":"Ranges describe relative tendencies in this response set, not grades or ability levels.","ranges":[{"key":"lower","label":"Lower range","description":"This tendency may be less prominent or may appear in narrower situations. Lower does not mean worse."},{"key":"middle","label":"Middle range","description":"You may shift between both sides of the dimension depending on context, role, or current demands."},{"key":"higher","label":"Higher range","description":"This tendency may appear more readily across situations. Higher does not mean better."}],"boundary":"Small differences near a range boundary should not be treated as a sharp change in personality."}} {"asset_id":"big5.en.w2.action_growth_advice","unit":"action_growth_advice","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"title":"Turn the result into small experiments","actions":[{"context":"awareness","prompt":"Choose one tendency and write down two recent situations where it helped and one where it created friction."},{"context":"flexibility","prompt":"Try a low-risk behavior from the other side of the dimension and observe what changes."},{"context":"environment","prompt":"Adjust one cue, routine, or boundary so the behavior you want is easier to repeat."},{"context":"review","prompt":"Revisit the experiment after a week and keep only what was useful in that context."}],"boundary":"These are reflection ideas, not treatment, performance, or career prescriptions."}} {"asset_id":"big5.en.w2.workplace_relationship_copy","unit":"workplace_relationship_copy","locale":"en","status":"pending_manual_review","runtime_use":"draft_review_only","ready_for_runtime":false,"ready_for_production":false,"production_use_allowed":false,"content":{"workplace":{"title":"At work","body":"Your tendencies may shape how you plan, communicate, respond to change, and manage stimulation. Role expectations and team norms can strengthen or soften the pattern.","prompt":"Which working conditions help you contribute consistently, and which require deliberate adjustment?"},"relationships":{"title":"In relationships","body":"The same tendency may be helpful in one interaction and difficult in another. Consider communication habits, boundaries, repair, and the other person's context rather than ranking one style above another.","prompt":"What helps you stay clear and considerate when your preferences differ?"},"boundary":"This content does not predict job performance, determine employment decisions, rate relationship quality, or guarantee outcomes."}} diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json index 494da9037..0e8752bbe 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/inventory_row_reconciliation.json @@ -9,6 +9,38 @@ "english_historical_revision_verification": 50, "result_content": 16 }, + "facet_semantic_anchors": { + "O1": ["inner associations", "simulate possibilities"], + "O2": ["form, atmosphere, rhythm", "texture of details"], + "O3": ["identify, approach, and express inner feelings", "use them as information"], + "O4": ["new methods, routes, and experiences", "test and revise your approach"], + "O5": ["abstract concepts", "system relationships", "explanatory frameworks"], + "O6": ["established rules", "traditional positions", "value boundaries"], + "C1": ["handle tasks", "understand requirements", "solve problems"], + "C2": ["structure, neatness, plans", "predictable arrangements"], + "C3": ["commitments, rules, and duties", "front of decisions"], + "C4": ["goals, demanding standards", "level of completion"], + "C5": ["keep making progress", "feedback or reward is not immediate"], + "C6": ["risks, consequences, and steps", "before acting"], + "E1": ["goodwill, closeness, and approachability", "one-to-one interactions"], + "E2": ["multi-person settings", "social density", "energy from groups"], + "E3": ["occupy an expressive position", "state requests", "influence"], + "E4": ["life speed", "task density", "physical energy"], + "E5": ["novel, intense", "high-arousal experiences"], + "E6": ["frequency", "lightness, excitement, and enjoyment"], + "A1": ["intentions as trustworthy", "offering goodwill"], + "A2": ["directly, transparently", "little strategy"], + "A3": ["circumstances, needs, and burdens", "considerations"], + "A4": ["maintain the relationship", "yield when useful", "prevent escalation"], + "A5": ["reduce self-prominence", "placing yourself at the center"], + "A6": ["vulnerability, hardship", "emotional pain"], + "N1": ["early alertness", "risks, errors", "uncertain consequences"], + "N2": ["internal anger or resistance", "obstructed, misunderstood", "boundary is violated"], + "N3": ["under sustained pressure", "drained, fatigued", "energy needed"], + "N4": ["feel discomfort", "monitor yourself", "gaze, evaluation, or social exposure"], + "N5": ["when overloaded", "disconnect, withdraw", "change the situation immediately"], + "N6": ["visible coping limits", "high pressure, loss of control", "complex demands"] + }, "public_profile_control_rows": [ "W2-PUBLIC-domain-agreeableness", "W2-PUBLIC-domain-conscientiousness", diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json index 9207570e0..7597da9a4 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/sha256_manifest.json @@ -4,15 +4,15 @@ "files": [ {"path":"package_manifest.json","sha256":"03e4864904f7ecec26822a65475d3183f8aa3edbaf70e41547fbc54cb6d4f5eb"}, {"path":"source_ledger.json","sha256":"0e9fe6d9f600e10792ff02c2b88dabfbfc704c7674ac9b77feb1c948fbd5ca99"}, - {"path":"inventory_row_reconciliation.json","sha256":"5736adb3c5f6c900be9151ef28fab828fc8c80a922b992f4db67d77de532105a"}, + {"path":"inventory_row_reconciliation.json","sha256":"bc2ff3c48a259b38f6afc3d606261f31e1cfa988348830623853f3b8833fcfe9"}, {"path":"translation_map.json","sha256":"d2cab97371f0392f647b5c057365ebf7001ecca7cd7b10cd6a172202fe4c965d"}, {"path":"claim_boundary_report.json","sha256":"13edb5670dc2e13b91e297184fb7787e665378af9c72c0199bb44175566deab8"}, - {"path":"content_assets.jsonl","sha256":"45e827319938bb99088d93697ec5fcbd0f342fb8d2aabe3034bd92aba2f4d2f3"}, + {"path":"content_assets.jsonl","sha256":"3b06cfbb529a478013d862e968a62a64958e1e8d8eee883153dcfbe0ce33e241"}, {"path":"surface_coverage.json","sha256":"27e9eebc8184d75a4b6d69a2f9288b17bcf9164ebf301c7a17eb7962cea98b92"}, {"path":"duplicate_report.json","sha256":"743df9149508a4a3c6afbc6f7259cc4435cd7b7ea215fcdc1a5cc0707d641f0d"}, {"path":"editorial_self_review.json","sha256":"2d5510233468d6ef2463e324c9a4c28ff76b786aaebf4249b6711326279e25cc"}, - {"path":"README.md","sha256":"fed2fffc406ce47e63f251ab50a63f843145779efb03709b9656b3202f9b0a8a"}, - {"path":"validate_package.php","sha256":"1eac658d0df335a4556fe2c0da3aefa3f0de1420bb02b3555e5cd5afcf6411c5"} + {"path":"README.md","sha256":"df99c21d6ebea9bb6656701fb464e9f8cf7798edd32b94c38b41ae655a66cb89"}, + {"path":"validate_package.php","sha256":"0897c9c2493818cee68055d2506991fa5ebbb0e1a663ebed4c84f86bbb3bc68c"} ], - "package_sha256": "47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4" + "package_sha256": "aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81" } diff --git a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php index f0bcae07e..67e9108ee 100644 --- a/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php +++ b/backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1/validate_package.php @@ -129,6 +129,27 @@ } } +$facetAnchors = $reconciliation['facet_semantic_anchors'] ?? []; +$facetsByCode = array_column( + $assetsByUnit['facet_subscale_explanations']['content']['facets'] ?? [], + null, + 'code' +); +if (array_keys($facetAnchors) !== array_keys($facetsByCode) || count($facetAnchors) !== 30) { + throw new RuntimeException('Facet semantic anchor cohort does not match all 30 facets.'); +} +foreach ($facetAnchors as $code => $anchors) { + $semanticText = strtolower( + (string) ($facetsByCode[$code]['label'] ?? '').' '. + (string) ($facetsByCode[$code]['description'] ?? '') + ); + foreach ($anchors as $anchor) { + if (! str_contains($semanticText, strtolower((string) $anchor))) { + throw new RuntimeException("Facet source semantic anchor is missing for {$code}: {$anchor}"); + } + } +} + $encodedAssets = json_encode($assets, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR); if (preg_match('/[\x{3400}-\x{9FFF}\x{F900}-\x{FAFF}]/u', $encodedAssets) === 1) { throw new RuntimeException('CJK leakage detected.'); diff --git a/backend/docs/seo/en-parity-w2-big-five-result-assets.md b/backend/docs/seo/en-parity-w2-big-five-result-assets.md index afb1a5e3e..f4f9261b5 100644 --- a/backend/docs/seo/en-parity-w2-big-five-result-assets.md +++ b/backend/docs/seo/en-parity-w2-big-five-result-assets.md @@ -6,13 +6,13 @@ The package contains natural English reader copy for previews, locked and full reports, entitlements, five dimensions, 30 facets, score-range boundaries, practical reflection, workplace and relationship context, public-safe sharing, private PDF/history use, calls to action, fail-closed states, cross-device reading, and reader-facing analytics labels. -It also reconciles every row in the immutable 118-row source inventory: 52 completed public-profile controls and 50 historical revision rows remain preserved and unmodified, while all 16 result-content rows map to exact draft asset IDs, content keys, and nested item identities. +It also reconciles every row in the immutable 118-row source inventory: 52 completed public-profile controls and 50 historical revision rows remain preserved and unmodified, while all 16 result-content rows map to exact draft asset IDs, content keys, and nested item identities. Source-aligned semantic anchors cover all 30 facet codes. ## Exact lineage - Inventory merge SHA: `897490e4baa31fe197ee50c89f0c3fae6bac408d` - Inventory package SHA-256: `0f50f4108af14656442ef7d57d410b2e74f8dffced6ed3db372bf848ea051292` -- Result content package SHA-256: `47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4` +- Result content package SHA-256: `aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81` ## Boundaries diff --git a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json index b6b5565cf..2b7be0343 100644 --- a/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json +++ b/backend/docs/seo/generated/en-parity-w2-big-five-result-assets.v1.json @@ -18,7 +18,7 @@ }, "output_package": { "path": "backend/content_packs/BIG5_OCEAN/v2/packages/en_parity/w2_result_content_v1", - "package_sha256": "47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4", + "package_sha256": "aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81", "inventory_unit_count": 16, "covered_unit_count": 16, "asset_group_count": 16, @@ -30,6 +30,7 @@ "exact_units": "PASS", "exact_118_source_rows": "PASS", "result_row_required_keys": "PASS", + "all_30_facet_semantic_anchors": "PASS", "unique_traceability": "PASS", "english_complete": "PASS", "cjk_leakage": 0, diff --git a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php index dcd0e956e..9f5ecba70 100644 --- a/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php +++ b/backend/tests/Feature/Content/BigFiveEnglishResultAssetPackageTest.php @@ -110,6 +110,20 @@ public function it_reconciles_all_118_frozen_source_rows_and_required_result_key $this->assertSame($expectedIdentities, $actualIdentities, "{$unit}.{$path}"); } } + + $facetsByCode = array_column( + $assetsByUnit['facet_subscale_explanations']['content']['facets'], + null, + 'code' + ); + $this->assertCount(30, $reconciliation['facet_semantic_anchors']); + $this->assertSame(array_keys($facetsByCode), array_keys($reconciliation['facet_semantic_anchors'])); + foreach ($reconciliation['facet_semantic_anchors'] as $code => $anchors) { + $semanticText = strtolower($facetsByCode[$code]['label'].' '.$facetsByCode[$code]['description']); + foreach ($anchors as $anchor) { + $this->assertStringContainsString(strtolower($anchor), $semanticText, "{$code}: {$anchor}"); + } + } } #[Test] @@ -207,6 +221,14 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar $this->assertSame('Delayed-Feedback Persistence', $c5['label']); $this->assertStringContainsString('keep making progress', $c5['description']); $this->assertStringContainsString('feedback or reward is not immediate', $c5['description']); + $e2 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'E2' + ))[0]; + $this->assertSame('Group Participation', $e2['label']); + $this->assertStringContainsString('multi-person settings', $e2['description']); + $this->assertStringContainsString('social density', $e2['description']); + $this->assertStringContainsString('energy from groups', $e2['description']); $a4 = array_values(array_filter( $byUnit['facet_subscale_explanations']['facets'], static fn (array $facet): bool => $facet['code'] === 'A4' @@ -231,6 +253,14 @@ public function it_enforces_share_private_reader_entitlement_and_failure_boundar $this->assertStringContainsString('under sustained pressure', $n3['description']); $this->assertStringContainsString('drained, fatigued', $n3['description']); $this->assertStringContainsString('energy needed to keep responding', $n3['description']); + $n4 = array_values(array_filter( + $byUnit['facet_subscale_explanations']['facets'], + static fn (array $facet): bool => $facet['code'] === 'N4' + ))[0]; + $this->assertSame('Social Self-Consciousness', $n4['label']); + $this->assertStringContainsString('feel discomfort', $n4['description']); + $this->assertStringContainsString('monitor yourself', $n4['description']); + $this->assertStringContainsString('gaze, evaluation, or social exposure', $n4['description']); $n5 = array_values(array_filter( $byUnit['facet_subscale_explanations']['facets'], static fn (array $facet): bool => $facet['code'] === 'N5' @@ -276,7 +306,7 @@ public function it_has_a_deterministic_byte_exact_sha_manifest(): void hash('sha256', implode("\n", $canonical)) ); $this->assertSame( - '47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4', + 'aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81', $shaManifest['package_sha256'] ); } diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 389d0e308..dd18156f7 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102419,7 +102419,7 @@ }, "local_validation": { "status": "pass", - "evidence": "Package validator passes twice byte-identically with SHA 47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4. Focused package PHPUnit passes 7 tests / 434 assertions with exact 118-row reconciliation, required-key coverage, and complete package-file binding; runtime-freeze explicit-file regression passes 2 tests / 6 assertions with unknown package paths blocked; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." + "evidence": "Package validator passes twice byte-identically with SHA aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81. Focused package PHPUnit passes 7 tests / 517 assertions with exact 118-row reconciliation, all-30 facet semantic anchors, required-key coverage, and complete package-file binding; runtime-freeze explicit-file regression passes 2 tests / 6 assertions with unknown package paths blocked; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { "status": "pending", @@ -102494,8 +102494,13 @@ "at": "2026-07-31T06:57:44Z", "status": "review_fix_local_checks_passed", "note": "Exact-head review on cf28114bff98d84d71cb72dfbec3bb1c60723830 identified two package-integrity gaps. The validator and focused test now require the actual package directory file set to equal every SHA-manifest entry plus sha256_manifest.json, so unbound extra files fail closed. The runtime-freeze exception now allowlists only the twelve reviewed draft-package files and blocks unknown future files under the same directory. Package SHA is 47d43575aea0c638a21b90c33e1f0c147e4f679986d76db182c0f28606cf4dd4. Validator passes twice; package suite passes 7 tests / 434 assertions, explicit classifier regression passes 2 tests / 6 assertions, content suite passes, and Pint, parsers, diff, and scope checks pass." + }, + { + "at": "2026-07-31T07:09:01Z", + "status": "review_fix_local_checks_passed", + "note": "Exact-head review on 65b8cd1f09d16b03153a5a1468bd2567ac6e32b4 identified E2 group-participation and N4 social-discomfort drift. Reconciled all 30 facet descriptions directly against the pinned glossary and added per-code semantic anchors enforced by both validator and focused tests, so future drift in any facet fails closed. E2 now covers multi-person settings, social density, and energy from groups; N4 covers discomfort, self-monitoring, and withdrawal under gaze, evaluation, or social exposure. Package SHA is aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81. Validator passes twice; package suite passes 7 tests / 517 assertions, classifier and content suites pass, and Pint, parsers, diff, and scope checks pass." } ], - "updated_at": "2026-07-31T06:57:44Z" + "updated_at": "2026-07-31T07:09:01Z" } } From 37d6bb473d8a0f8072e4920fd4c8813fa3ea47c2 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 15:09:58 +0800 Subject: [PATCH 19/20] chore(pr-train): bind all-facet semantic repair --- docs/codex/pr-train-state.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index dd18156f7..463a67f02 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102406,7 +102406,7 @@ "depends_on": [ "EN-PARITY-W2-BIG5-INVENTORY-01" ], - "commit_sha": "ecef0fbd2dc2b240350d12aebed04dd942974eda", + "commit_sha": "be8e157199b43d0431dde0d3ccf1c6cb084aa1bf", "pr_url": "https://github.com/fermatmind/fap-api/pull/3451", "checks": { "dependency": { @@ -102423,7 +102423,7 @@ }, "github_required_checks": { "status": "pending", - "evidence": "PR 3451 package-integrity repair head ecef0fbd2dc2b240350d12aebed04dd942974eda requires fresh exact-head checks and review after complete-file binding and explicit classifier allowlisting." + "evidence": "PR 3451 all-facet semantic repair head be8e157199b43d0431dde0d3ccf1c6cb084aa1bf requires fresh exact-head checks and review after E2, N4, and all-30 semantic anchor locking." } }, "scope_validation": { From 7fa4932039d2e0a5ed82f967e5d7d6856b5c2a83 Mon Sep 17 00:00:00 2001 From: fermatmind <17551046983@163.com> Date: Fri, 31 Jul 2026 15:25:21 +0800 Subject: [PATCH 20/20] docs: mark Big Five result assets ready --- docs/codex/pr-train-state.json | 17 +++++++++++++---- docs/codex/pr-train.yaml | 2 +- .../sidecar_issues.json | 17 +++++++++++++++++ .../pr-train-sidecar-issues/sidecar_issues.md | 19 +++++++++++++++++++ 4 files changed, 50 insertions(+), 5 deletions(-) diff --git a/docs/codex/pr-train-state.json b/docs/codex/pr-train-state.json index 463a67f02..139a46787 100644 --- a/docs/codex/pr-train-state.json +++ b/docs/codex/pr-train-state.json @@ -102422,14 +102422,18 @@ "evidence": "Package validator passes twice byte-identically with SHA aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81. Focused package PHPUnit passes 7 tests / 517 assertions with exact 118-row reconciliation, all-30 facet semantic anchors, required-key coverage, and complete package-file binding; runtime-freeze explicit-file regression passes 2 tests / 6 assertions with unknown package paths blocked; composer test:content passes 4 tests / 62 assertions. Scoped Pint, PHP syntax, JSON/JSONL/YAML parsing, CJK/private-field/public-URL/fixed-type/forbidden-claim scans, deterministic SHA recomputation, diff checks, and exact allowlist validation pass." }, "github_required_checks": { - "status": "pending", - "evidence": "PR 3451 all-facet semantic repair head be8e157199b43d0431dde0d3ccf1c6cb084aa1bf requires fresh exact-head checks and review after E2, N4, and all-30 semantic anchor locking." + "status": "pass", + "evidence": "Exact head 37d6bb473d8a0f8072e4920fd4c8813fa3ea47c2 passed all nine applicable checks in CI run 30611920168 and Code Scanning run 30611920174: hygiene, supply-chain, content-pack-build-validate, verify-mbti-legacy, verify-mbti-v2, verify-bigfive, Semgrep blocking secrets, Semgrep OSS, and semgrep SARIF upload. verify-staging-parity was skipped and is not required." + }, + "optional_codex_review": { + "status": "external_nonblocking", + "evidence": "An exact-head review request returned the explicit Codex usage-limit comment at 2026-07-31T07:19:29Z without generating a new review. The external account/service quota is recorded in generated/pr-train-sidecar-issues; repo policy does not require this review, GitHub reports CLEAN/MERGEABLE, and all prior review threads are resolved." } }, "scope_validation": { "allowed_paths_only": true, "local_validation_passed": true, - "github_checks_green": false, + "github_checks_green": true, "post_merge_revalidated": false }, "failure_reason": null, @@ -102499,8 +102503,13 @@ "at": "2026-07-31T07:09:01Z", "status": "review_fix_local_checks_passed", "note": "Exact-head review on 65b8cd1f09d16b03153a5a1468bd2567ac6e32b4 identified E2 group-participation and N4 social-discomfort drift. Reconciled all 30 facet descriptions directly against the pinned glossary and added per-code semantic anchors enforced by both validator and focused tests, so future drift in any facet fails closed. E2 now covers multi-person settings, social density, and energy from groups; N4 covers discomfort, self-monitoring, and withdrawal under gaze, evaluation, or social exposure. Package SHA is aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81. Validator passes twice; package suite passes 7 tests / 517 assertions, classifier and content suites pass, and Pint, parsers, diff, and scope checks pass." + }, + { + "at": "2026-07-31T07:23:51Z", + "status": "ready_to_merge", + "note": "Exact head 37d6bb473d8a0f8072e4920fd4c8813fa3ea47c2, containing semantic implementation head be8e157199b43d0431dde0d3ccf1c6cb084aa1bf and immutable package SHA aea87a8c0545d1be6cb1a32ff981576d62d077a8eab36834f34ec9d41c1bfc81, passed all nine applicable required checks. All prior review threads are resolved. A new optional Codex review could not be generated because the external account review quota was exhausted; the non-required blocker is recorded in the sidecar, repo policy requires no review, and GitHub reports CLEAN/MERGEABLE." } ], - "updated_at": "2026-07-31T07:09:01Z" + "updated_at": "2026-07-31T07:23:51Z" } } diff --git a/docs/codex/pr-train.yaml b/docs/codex/pr-train.yaml index 756b7580a..4056fc071 100644 --- a/docs/codex/pr-train.yaml +++ b/docs/codex/pr-train.yaml @@ -116,7 +116,7 @@ prs: base: main branch: codex/en-parity-w2-big5-result-assets-01 title: "EN-PARITY-W2-BIG5-RESULT-ASSETS-01: produce reviewed Big Five English result assets" - status: github_checks_pending + status: ready_to_merge depends_on: - EN-PARITY-W2-BIG5-INVENTORY-01 train_scope: en_parity_w2_big5_result_assets diff --git a/generated/pr-train-sidecar-issues/sidecar_issues.json b/generated/pr-train-sidecar-issues/sidecar_issues.json index c68869365..ba54aa6a1 100644 --- a/generated/pr-train-sidecar-issues/sidecar_issues.json +++ b/generated/pr-train-sidecar-issues/sidecar_issues.json @@ -553,5 +553,22 @@ "recommended_follow_up": "This PR was rebased on the merged repair and must rerun its complete declared local validation and required GitHub checks.", "status": "repaired_by_independent_baseline_pr", "train_continued": true + }, + { + "observed_at": "2026-07-31T07:23:51Z", + "repo": "fap-api", + "pr_id": "EN-PARITY-W2-BIG5-RESULT-ASSETS-01 / PR #3451", + "branch": "codex/en-parity-w2-big5-result-assets-01", + "blocker_type": "external_codex_code_review_quota_exhausted", + "evidence": [ + "The exact-head Codex review request for 37d6bb473d8a0f8072e4920fd4c8813fa3ea47c2 returned an explicit usage-limit comment at 2026-07-31T07:19:29Z and did not generate a new code review.", + "CI run 30611920168 and Code Scanning run 30611920174 completed with all nine applicable checks passing; verify-staging-parity was skipped and is not a required check.", + "GitHub reports the PR CLEAN/MERGEABLE with no required review decision, and every previously generated review thread is resolved." + ], + "why_not_current_pr_scope": "The exhausted Codex review allowance is an account/service quota outside the draft package, tests, and repository metadata changed by this PR.", + "required_checks_affected": false, + "recommended_follow_up": "Replenish or enable Codex review credits before a future optional review request. No code change is required: the exact-head package already enforces all-30 facet semantic anchors and all earlier review findings are resolved.", + "status": "recorded_external_nonblocking", + "train_continued": true } ] diff --git a/generated/pr-train-sidecar-issues/sidecar_issues.md b/generated/pr-train-sidecar-issues/sidecar_issues.md index 7843d56c1..1ae552962 100644 --- a/generated/pr-train-sidecar-issues/sidecar_issues.md +++ b/generated/pr-train-sidecar-issues/sidecar_issues.md @@ -623,3 +623,22 @@ - This PR was rebased on the merged repair and must rerun its complete declared local validation and required GitHub checks. - status: `repaired_by_independent_baseline_pr` - whether train continued: `true` + +## W2 Big Five result-assets optional Codex review quota + +- observed at: `2026-07-31T07:23:51Z` +- repo: `fap-api` +- PR id / branch: `EN-PARITY-W2-BIG5-RESULT-ASSETS-01` / PR #3451 / `codex/en-parity-w2-big5-result-assets-01` +- blocker type: `external_codex_code_review_quota_exhausted` +- evidence: + - The exact-head Codex review request for `37d6bb473d8a0f8072e4920fd4c8813fa3ea47c2` returned an explicit usage-limit comment at `2026-07-31T07:19:29Z` and did not generate a new code review. + - CI run `30611920168` and Code Scanning run `30611920174` completed with all nine applicable checks passing; `verify-staging-parity` was skipped and is not required. + - GitHub reports the PR CLEAN/MERGEABLE with no required review decision, and every previously generated review thread is resolved. +- why not current PR scope: + - The exhausted Codex review allowance is an account/service quota outside the draft package, tests, and repository metadata changed by this PR. +- whether required checks are affected: `false` +- recommended follow-up: + - Replenish or enable Codex review credits before a future optional review request. + - No code change is required: the exact-head package already enforces all-30 facet semantic anchors and all earlier review findings are resolved. +- status: `recorded_external_nonblocking` +- whether train continued: `true`