feat(codegen): split sidecar DDL by dialect; reject json sidecar (#45)#113
Merged
Conversation
generate_sidecar_schema now takes a SqlDialect and dispatches to new
overlay::sqlite / overlay::postgres modules. The portable table bodies
are shared via assemble(); the only dialect-divergent fragment — the
metadata upsert — is per-module: SQLite INSERT OR IGNORE vs PostgreSQL
INSERT … ON CONFLICT DO NOTHING. The SQLite-only datetime('now') is
replaced by portable CURRENT_TIMESTAMP.
SqlDialect::from_storage maps [sidecar].storage: sqlite→Sqlite,
postgres/postgresql→Postgres, and rejects "json" (previously it
silently emitted SQLite DDL for a JSON store) with a pointer to the
split-out tracking issue #112. main.rs derives the dialect from the
manifest; SidecarConfig docs updated.
6 existing overlay tests retained (now dialect-explicit) + 5 new:
sqlite seed/timestamp, postgres ON CONFLICT, shared bodies, empty
schema, storage→dialect mapping. Suite: 112 lib + 9 integration green.
Closes #45.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 21 issues detected
View findings[
{
"reason": "Required file missing",
"type": "missing",
"file": "SECURITY.md",
"action": "create",
"rule_module": "root_hygiene",
"severity": "high"
},
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Action actions/checkout@v4 needs attention",
"type": "unpinned_action",
"file": "rust-ci.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action Swatinem/rust-cache@v2 needs attention",
"type": "unpinned_action",
"file": "rust-ci.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action actions/checkout@v4 needs attention",
"type": "unpinned_action",
"file": "rust-ci.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action dtolnay/rust-toolchain@master needs attention",
"type": "unpinned_action",
"file": "rust-ci.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Action Swatinem/rust-cache@v2 needs attention",
"type": "unpinned_action",
"file": "rust-ci.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Required file missing (condition: public_repo)",
"type": "missing_requirement",
"file": "SECURITY.md",
"action": "create",
"rule_module": "cicd_rules",
"severity": "high"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
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.
Resolves #45 (V-L2-F1) — split overlay DDL by dialect; resolve the json sidecar.
What changed
codegen::overlay::SqlDialect { Sqlite, Postgres }+from_storage()mapping[sidecar].storage.generate_sidecar_schema(schema, octad, dialect)dispatches tooverlay::sqlite::generate/overlay::postgres::generate. Portable table bodies are shared viaassemble(); the only dialect-divergent fragment (metadata upsert) is per-module: SQLiteINSERT OR IGNOREvs PostgreSQLINSERT … ON CONFLICT DO NOTHING.datetime('now')replaced by portableCURRENT_TIMESTAMP(both engines).storage = "json"is now rejected with a clear error (it previously silently emitted SQLite DDL for a JSON store). Implementing/dropping the JSON store is split out as V-L2-F2: implement the JSON sidecar storage backend (split from #45) #112 (V-L2-F2);SidecarConfigdocs updated.main.rsderives the dialect from the manifest.Acceptance
overlay::sqlite,overlay::postgres)jsonsidecar storage is resolved — rejected here, tracked separately by V-L2-F2: implement the JSON sidecar storage backend (split from #45) #1126 existing overlay tests retained (dialect-explicit) + 5 new. Suite: 112 lib + 9 integration green. The single red is the pre-existing failing-by-design
provenance_fork_test(#104, fixed by open PR #109) — onmain, unrelated.Note: developed in an isolated git worktree because a concurrent session was mutating the shared checkout; this branch contains only the #45 change (no #51/#38 contamination).
🤖 Generated with Claude Code