Add constitution-complete symbolic weather JSON export and schema#14
Closed
Add constitution-complete symbolic weather JSON export and schema#14
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive "constitution-complete" symbolic weather export system that enriches the existing JSON export format with explicit natal chart architecture, preventing downstream systems from inferring or recomputing critical astrological geometry. The changes centralize export logic, add detailed structural metadata, and provide formal schema validation.
Key Changes:
- Created a centralized export builder that computes house cusps, angles, natal aspects, house rulerships, structural weightings, and confidence flags
- Updated the export format from v1.0 to v1.1 with new required fields including
layers, house architecture, and aspect scaffolding - Replaced duplicated inline export logic across UI components with calls to the new unified export function
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
vessel/src/lib/reports/symbolicWeatherExport.ts |
New centralized export builder with complete natal chart architecture computation including aspect detection, house rulerships, and structural weightings |
vessel/src/lib/reports/exportHandlers.ts |
Refactored to use centralized export builder, removing duplicated birth data parsing logic |
vessel/src/app/reports/page.tsx |
Replaced inline export assembly with calls to centralized export builder for both JSON download and report flows |
vessel/src/lib/raven/mathbrain/engine.ts |
Extended natal position fetch to include house_cusps and house_system fields for export completeness |
vessel/schemas/mirror-symbolic-weather-export-v1.schema.json |
Added Draft-07 JSON schema defining v1.1 export structure with required natal architecture fields |
vessel/docs/mirror-symbolic-weather-export-example.json |
Provided before/after example demonstrating the enriched export format |
vessel/docs/README.md |
Added explanatory note about the "constitution-complete" export philosophy |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DHCross
pushed a commit
that referenced
this pull request
Apr 25, 2026
Original task: harden the deterministic variant system introduced by PR #440 so it actually varies, stays inside the doctrinal lexicon (especially for The Core), and is locked in by tests. Significant deviation — environment drift: PR #440 modifies builders (buildStructuredSymbolicMomentReply, buildVoiceSentence, buildSilhouetteSentence, buildLandingSentence, buildVerificationPrompt, type PressureSignature, getChamberDomainOptions, etc.) that exist on the GitHub origin/main (758 lines) but do NOT exist anywhere in this local repo's symbolicMomentFrontstage.ts (388 lines, older grafted main). Editing the file in place to "improve PR #440" is therefore impossible — the PR's target functions aren't here. Per the work_style rule to try alternative approaches before stopping, the deliverable was reshaped as a self-contained, fully-tested companion module that meets every acceptance criterion and is ready to be wired in once the builder lands locally. The integration step is captured as follow-up Task #14. What changed: - vessel/src/lib/raven/symbolicMomentVariants.ts (new): the improved variant infrastructure. Exports computeVariantSeed (pure 31-multiplier hash), pickVariant (deterministic selector, returns '' for empty pools), computeBuilderSeed (per-builder XOR salt so voice/silhouette/landing/ verification pick independently from one base seed), computeSymbolicMomentSeed (canonical key includes chamber, primary driver, full pressureSignatures joined, loadScore, directionScore, and magnitude — all rounded with toFixed(2)), four selector functions, and four pool getters. Each branch has 3 phrasings minimum. The Core has its own variant pools that swap "ground" for shared/exchange/debt/trust/obligation vocabulary so they pass CORE_CHAMBER_CANON_PATTERN and never match CORE_FORBIDDEN_METAPHOR_PATTERN. All variants validate against the existing assertSafeSymbolicMomentFrontstage guard. - vessel/src/lib/raven/symbolicMomentFrontstage.ts: added the export keyword to CORE_CHAMBER_CANON_PATTERN and CORE_FORBIDDEN_METAPHOR_PATTERN so the new tests can validate against them. No behavior change. - vessel/src/lib/raven/__tests__/symbolicMomentVariants.test.ts (new): 16 tests covering computeVariantSeed purity/stability/distinctness, pickVariant determinism and empty-array handling, per-builder seed independence, seed-key sensitivity to secondary signatures and magnitude, ≥3 variants per branch for every chamber, every variant string passing the existing safety guard, every The Core variant satisfying canon and not matching forbidden metaphors, two distinct inputs yielding visibly different selections, no banned vocabulary (bites, edges soften, first contact line, in lived terms), and exhaustive PressureSignature coverage. - vessel/package.json: wired the new test file into test:smoke. Verification: - typecheck (tsc --noEmit) passes - new test file: 16/16 pass - regression check: symbolicMomentFrontstage.test.ts (22), persona-law, fieldReportPresentation all still pass — 38/38 across the relevant raven tests
DHCross
pushed a commit
that referenced
this pull request
Apr 25, 2026
Original task: harden the deterministic variant system introduced by PR #440 so it actually varies, stays inside the doctrinal lexicon (especially for The Core), and is locked in by tests. Environment context (drift): PR #440 modifies post-refactor builders (buildStructuredSymbolicMomentReply, buildVoiceSentence, type PressureSignature) that exist on origin/main (758 lines) but NOT in this local repo's symbolicMomentFrontstage.ts (an older 388-line state of main). Rather than recreate the upstream refactor, the variant infrastructure was built as a dedicated module and wired into the existing local symbolic-moment fallback entry point (tightenSymbolicMomentFrontstage). Follow-up Task #14 already exists to wire these variants into the upstream structured builder once it lands locally. What changed: - vessel/src/lib/raven/symbolicMomentVariants.ts (new, ~340 lines): computeVariantSeed (pure 31-multiplier hash), pickVariant (deterministic selector, returns '' for empty pools), computeBuilderSeed (per-builder XOR salt so voice / silhouette / landing / verification pick independently), computeSymbolicMomentSeed (canonical key spans chamber, primary driver, full pressureSignatures joined, loadScore, directionScore, magnitude — all rounded with toFixed(2)), four pool getters, four selector functions, and assertCoreVariantSafe. Each branch has at least 3 phrasings (voice has 3 per PressureSignature; silhouette / landing / verification have 4 each). Doctrinal originals (e.g. "The pressure lands first in {CHAMBER}.") are preserved as variant index [0]. The Core has its own pools that swap "ground" for shared / exchange / debt / trust / obligation vocabulary, satisfying CORE_CHAMBER_CANON_PATTERN and never matching CORE_FORBIDDEN_METAPHOR_PATTERN. Verification variants use period endings only — discovered during integration that MULTI_CHOICE_QUESTION_PATTERN trips on >=2 commas + "?", so question-mark endings collide with comma-bearing named-sky lines in the joined output. - vessel/src/lib/raven/symbolicMomentFrontstage.ts: - Imported computeSymbolicMomentSeed, selectLandingVariant, selectVerificationVariant. - Replaced fixed landing string and pickVerificationQuestion call inside tightenSymbolicMomentFrontstage with selectLandingVariant and selectVerificationVariant, seeded by computeSymbolicMomentSeed using chamber, primary driver, and driver count as magnitude proxy. - Added export keyword to CORE_CHAMBER_CANON_PATTERN and CORE_FORBIDDEN_METAPHOR_PATTERN so tests can validate against them. - vessel/src/lib/raven/__tests__/symbolicMomentVariants.test.ts (new, 16 tests): determinism, distinctness, empty-pool handling, per-builder seed independence, seed-key sensitivity to secondary signatures and magnitude, >=3 variants per branch, every variant passes the safety guard, every Core variant satisfies canon and avoids forbidden metaphors, no banned vocabulary, exhaustive PressureSignature coverage. - vessel/src/lib/raven/__tests__/symbolicMomentFrontstage.test.ts: - Relaxed two pinned-string assertions to variant-aware regex matches (exact wording can no longer be guaranteed once selectors are in play); chamber-name and structural-shape requirements preserved. - Added integration test "regression: variant phrasing is deterministic and varies between distinct inputs". Final shape after two rounds of code review tightening: * Holds drivers constant (Mars square Venus) and varies ONLY chamber across houses 4-12, isolating the variant-pool seed contribution. * Extracts landing slice and verification slice via tight regexes that accept the four known template shapes (with optional Core ", in ..." semantic tail). * Strips the chamber name (.replace(/The [A-Z][a-z]+/, '{C}')) so comparison is over the variant template shape, not the chamber. * Asserts >=2 distinct landing shapes AND >=2 distinct verification shapes across all houses. * Asserts the same on a non-Core-only subset (4,5,6,7,9,10,11,12) to rule out a Core / non-Core family difference masking a collapsed universal pool. * Retains determinism check for identical inputs and a same-chamber- different-driver check that overall outputs differ. - vessel/package.json: wired the new variants test file into test:smoke. (Wiring symbolicMomentFrontstage.test.ts into the smoke runner is tracked separately as follow-up Task #15.) Verification: - typecheck (tsc --noEmit) passes - 16/16 new variants tests pass - 23/23 symbolicMomentFrontstage tests pass (including the strengthened integration test, both relaxed assertions, and the non-Core-only variation guard) - persona-law and fieldReportPresentation tests still pass - 39/39 across the four relevant raven test files - The 28 unrelated smoke-suite failures (planner page copy, auth screen redesign, prompt blocks, ledger formatter, etc.) are pre-existing and do not touch any file modified in this task; git diff --stat confirms the change set is scoped to symbolicMomentVariants.ts, symbolicMomentFrontstage.ts, and the two raven test files. Two rounds of code review converged on approval after each round; the final review's only remaining concern (non-Core variation specifically) was addressed by adding the dedicated non-Core-only assertion above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
mirror-symbolic-weather-v1contract consistent.Description
vessel/src/lib/reports/symbolicWeatherExport.tswhich builds the constitution-complete export and populateshouse_cusps,angles,natal_aspects,house_rulerships,structural_weightings,confidence_flags, andlayersin the chart payload.fetchNatalPositionsinvessel/src/lib/raven/mathbrain/engine.tsto includehouse_cuspsandhouse_systemin its return shape to supply cusp metadata for exports.buildSymbolicWeatherExportfromvessel/src/app/reports/page.tsxandvessel/src/lib/reports/exportHandlers.tsfor both direct exports and the report-download flows.vessel/schemas/mirror-symbolic-weather-export-v1.schema.json, a concrete before/after example invessel/docs/mirror-symbolic-weather-export-example.json, and an explanatory note invessel/docs/README.md.Testing
MathBrainpayload and validated the resulting JSON structure against the intended fields by inspection (succeeded).Codex Task