Skip to content

interface import: bring #20 to main - #22

Merged
scottypate merged 3 commits into
mainfrom
interface-import-to-main
Aug 13, 2026
Merged

interface import: bring #20 to main#22
scottypate merged 3 commits into
mainfrom
interface-import-to-main

Conversation

@scottypate

Copy link
Copy Markdown
Contributor

Brings datamk interface import (#18, PR #20) to main.

Why this is needed

PR #20 merged on 2026-08-11 — but into virtual-cells-binding-model, not
main. PR #19 had already merged that branch to main two days earlier, so
the import work landed on a branch with no remaining path to the release
line. It is therefore absent from v0.0.18 (tagged 2026-08-13, after the
feature merged), and would have been absent from every subsequent release
too. Anyone needing it today has to hand-write interface blocks against
INFORMATION_SCHEMA.

This PR is virtual-cells-binding-model merged into current main, on a
fresh branch so the merge is reviewable and actually mergeable.

Contents

The two commits stranded on the old branch:

datamk interface import -p prod --bind gold_customer --as qfai_customer
emits a ready-to-edit bound export block from the warehouse object's own
live types — type: unmapped with the real type in a comment rather than a
guess for anything without a clean datamk type name. --write splices it
into cell.yaml as a byte-range textual edit, so existing comments survive.
It deliberately never emits a description: (ADR 0012 §3 rot); relatedly,
contract: supported no longer requires a locally authored description on a
bound export whose source has warehouse-documented columns.

Merge resolution

One conflict, in CHANGELOG.md — both sides added [Unreleased] entries.
Resolved by keeping both. All code files auto-merged: src/cli.rs,
src/main.rs, src/verify.rs, test/integrations/cli.rs.

The branch was 9 commits behind main, including the datamk_context: 3
bump and multi-cell serving, so the merge was verified rather than assumed:

  • cargo test — 682 passing, 0 failing
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo build — clean

Note for whoever owns virtual-cells-binding-model

That branch is now fully contained in this PR. It should be deleted after
merge rather than left as a target — it has already silently stranded one
user-facing feature by being a base branch that outlived its own merge.

🤖 Generated with Claude Code

scottypate and others added 3 commits August 11, 2026 04:16
Emits types, never descriptions. Copying warehouse prose into cell.yaml is
the rot issue #18 complains about, and automating the copy would only make
rot cheap. Types are safe to copy because verify checks them against the
warehouse on every run, so divergence is caught; descriptions have no such
check, so a copy goes stale silently. The warehouse's prose already rides
`observed.source_descriptions`, live and unrottable. An author writes a
local `description:` only when they mean something different from the
warehouse — authorship, not transcription.

  datamk interface import -p prod --bind gold_customer --as qfai_customer

stdout by default, `--write` splices into the `interface:` block by byte
range rather than round-tripping through serde_yaml, which would destroy
the teaching comments. Refuses an existing entry without `--force`. The
YAML goes to stdout and everything else to stderr, so piping is safe.

Types come from the warehouse's own schema; DuckDB stays the authority for
a raw-file source. An unmappable type emits `type: unmapped` with the real
type in a comment rather than dropping the column, since verify only checks
declared columns exist and a dropped one would ship as a hole. No `unit:`
is ever inferred, and `grain` and the export description stay empty because
both are judgment.

`contract: supported` is now satisfied by the meaning being available —
either a local description or one on the bound source — rather than by it
being restated locally, which would have forced the copy straight back in.

The inverse type mappings are siblings of the existing forward predicates,
never edits to them, each pinned by an offline round-trip test asserting
every declared name they emit satisfies the forward check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
interface import: scaffold an interface block from a bound object
…o interface-import-to-main

# Conflicts:
#	CHANGELOG.md
@scottypate
scottypate merged commit 0130c11 into main Aug 13, 2026
2 checks passed
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