Add Vietnam e-commerce compliance causal pack - #13
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 774fccd6ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const evList = Array.isArray(events) ? events : []; | ||
| const lkList = Array.isArray(links) ? links : []; | ||
| const sports = profile === 'sports-live'; |
There was a problem hiding this comment.
Reject unknown causal-quality profiles
When manifest.quality.causalProfile contains a typo or unsupported value, this comparison silently sets sports to false and runs the generic rules instead. In the checked validate-packs.yml workflow, such a pack can therefore pass while malformed completed scorelines, scheduled results, unknown knockout teams, relationship dominance, and missing watchpoints all bypass their intended checks; validate the profile against an explicit enum rather than treating every unknown value as generic.
Useful? React with 👍 / 👎.
| function baselineKeys(baseline) { | ||
| return new Set((baseline?.allowedIssues || []).map((x) => `${x.code}:${x.key}`)); |
There was a problem hiding this comment.
Bind baseline exceptions to the issue content
When add-match-day.mjs updates one of the five baselined World Cup events and replaces its existing scorer-only text with a different templated whyItMatters, the issue still has the same templated-why:<event-id> key and is downgraded to a warning. The baseline therefore exempts all future instances of that rule on those events rather than the exact known debt, allowing a new regression to pass both the match-day gate and CI; include a fingerprint or expected offending value in the baseline match.
Useful? React with 👍 / 👎.
What changed
New compliance pack
packs/vn-ecommerce-compliance-2026binding,derived-control, andrecommended-practicenodesresearch-preview,asOf: 2026-07-30, andquality.causalProfile: policy-systemicGeneric pack → Canvas projection contract
manifest.jsonandviews.jsondocs/PACK-VIEWS.mdevents.json,links.json, andinsights.jsonValidation and scale guardrails
scripts/validate-pack.mjsto validate optional manifests, view IDs, default views, highlighted paths, and all view-to-event referencessports-liveforworldcup-2026andpolicy-systemicfor the compliance packadd-match-day.mjsso cron updates use the pack's quality profile and baselineWhy
This PR tests a narrow but important Causari use case: turning regulatory change into an explainable causal path from source instrument to organizational adaptation and proof of execution.
The larger architectural goal is domain portability. World Cup, compliance, WWI teaching, AI-model recaps, and finance packs should share the same canonical graph contract while selecting different views and semantic quality profiles.
Safety and provenance
Validation
validate-packsGitHub Actions run 54: successpolicy-systemicprofile passessports-liveprofile remains active for World Cup-specific scoreline, entity, relationship-variety, and watchpoint checksmain, 0 behind, and mergeableFollow-up boundary
This PR ships the data contract and guardrails. A separate Canvas implementation should read
manifest.jsonandviews.jsonto provide: