Skip to content

Comments

feat: cross-domain comparison — gds-control + canonical validation across 3 DSLs#8

Merged
rororowyourboat merged 1 commit intomainfrom
feat/cross-domain-comparison
Feb 21, 2026
Merged

feat: cross-domain comparison — gds-control + canonical validation across 3 DSLs#8
rororowyourboat merged 1 commit intomainfrom
feat/cross-domain-comparison

Conversation

@rororowyourboat
Copy link
Collaborator

Summary

  • gds-control package: New state-space control DSL (ControlModelGDSSpecSystemIR) with elements, model validation, compiler, verification checks, and 117 tests
  • OGS canonical bridge: compile_pattern_to_spec() maps OGS patterns to GDSSpec, enabling h = f ∘ g canonical projection for game-theoretic systems (67 tests)
  • Cross-domain canonical validation: Stress suite proving canonical decomposition holds across all 3 DSLs (stockflow, control, games) with cross-domain comparison tests
  • Docs: Research boundaries guide, view stratification architecture, updated root CLAUDE.md and architecture docs for 3-DSL status

Canonical Spectrum Validated

Domain |X| |f| Form Character
OGS (games) 0 0 h = g Stateless — pure policy
Control n n h = f ∘ g Full dynamical system
StockFlow n n h = f ∘ g State-dominant accumulation

Test plan

  • uv run --package gds-control pytest packages/gds-control/tests -v (117 tests)
  • uv run --package gds-games pytest packages/gds-games/tests -v (229 tests, 67 canonical)
  • uv run --package gds-stockflow pytest packages/gds-stockflow/tests -v (cross-domain + canonical stress)
  • Full suite: uv run --package gds-framework pytest packages/gds-framework/tests packages/gds-viz/tests packages/gds-games/tests packages/gds-stockflow/tests packages/gds-control/tests -v

Copilot AI review requested due to automatic review settings February 21, 2026 16:31
Add compile_pattern_to_spec() which maps OGS patterns to GDSSpec,
enabling canonical projection (h = f ∘ g) for game-theoretic systems.
All games map to Policy, PatternInputs to BoundaryAction, yielding
the expected degenerate form: f=∅, X=∅, h=g (pure policy).

67 canonical tests validate five archetypes (sequential, parallel,
feedback, inputs, mixed types) plus cross-built equivalence and
parametric invariants across all patterns.

Document view stratification architecture: domain IRs for domain
vocabulary, GDSSpec/CanonicalGDS for semantic classification,
SystemIR for structural topology. Add RQ4 (cross-lens analysis)
to research boundaries.
@rororowyourboat rororowyourboat force-pushed the feat/cross-domain-comparison branch from 0021957 to 3a8cc9a Compare February 21, 2026 16:33
@rororowyourboat rororowyourboat merged commit 671f4b0 into main Feb 21, 2026
7 checks passed
@rororowyourboat rororowyourboat deleted the feat/cross-domain-comparison branch February 21, 2026 16:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an OGS→GDS bridge so OGS patterns can be compiled into GDSSpec and then canonically projected, with accompanying canonical-equivalence tests and updated architecture documentation for the 3-DSL canonical pipeline.

Changes:

  • Introduces compile_pattern_to_spec() to compile OGS Pattern into GDSSpec for project_canonical()
  • Adds a comprehensive OGS canonical test suite (archetypes + invariants + cross-built equivalence)
  • Updates docs to reflect view stratification / research boundaries after 3-DSL canonical integration

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/gds-games/tests/test_canonical.py New OGS→GDS canonical projection + equivalence tests
packages/gds-games/ogs/dsl/spec_bridge.py New bridge compiler from OGS Pattern to GDSSpec
packages/gds-games/ogs/init.py Re-exports compile_pattern_to_spec as part of the public API
docs/guides/view-stratification.md New guidance on which representation is authoritative for different “views”
docs/guides/research-boundaries.md Updates boundaries and adds RQ3/RQ4 content incorporating OGS canonical results

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Wire(
source=flow.source,
target=flow.target,
space=f"{flow.label} Flow",
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wire.space is being set to a derived string (e.g. "{flow.label} Flow") but no corresponding Space is registered on the GDSSpec. This makes spec.validate_spec() fail with “unregistered space …” errors (the validator treats any non-empty Wire.space as a reference). Either register actual Space objects for these names, or (likely for OGS) leave space empty and rely on the port names/labels for semantics instead.

Suggested change
space=f"{flow.label} Flow",
space="",

Copilot uses AI. Check for mistakes.
Wire(
source="Transform A",
target="Transform B",
space="Intermediate Flow",
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hand-built GDSSpec sets Wire.space="Intermediate Flow" but does not register a Space named "Intermediate Flow". As written, hand_spec.validate_spec() would fail due to an unregistered space reference. Either register a matching Space in the test, or set Wire.space to "" (and likewise ensure the DSL-compiled spec uses only registered space names).

Suggested change
space="Intermediate Flow",
space="",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant