Skip to content

[DJ Semantic Fingerprint 4] Bulk endpoint for viewing fingerprints + testing fixtures - #2490

Open
philipfweiss wants to merge 14 commits into
mainfrom
semantic-fingerprint-namespace-snapshots
Open

philipfweiss wants to merge 14 commits into
mainfrom
semantic-fingerprint-namespace-snapshots

Conversation

@philipfweiss

@philipfweiss philipfweiss commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Metadata consumers currently see semantic fingerprints only during deployment previews. This adds GET /namespaces/{namespace}/semantic-fingerprints?version=1 so they can bootstrap a complete baseline and reconcile it against committed server state.

The response covers the namespace and its descendants, with sorted node names, sorted owners, and current versioned fingerprints from the server's graph evaluator. Uncomputable nodes and their dependents return unknown. Unsupported versions are rejected, and existing namespace and node read checks apply.

Namespace prefixes are matched literally, so an underscore in taco_truck cannot pull in nodes from tacoxtruck.child. The regression checks both unrestricted reads and readers whose grants cover only the requested tree.

The Git-backed lunch fixture checks eight snapshot rows, compares six changed fingerprints with deployment-impact predictions after changing a source table, and confirms that two independent nodes keep their hashes. It also covers invalid stored SQL and unsupported versions. The compatibility guide explains version pins, migrations, and rollback.

Builds on the merged deployment-impact work in #2483. The refreshed branch preserves current main's fingerprint and deployment behavior.

Validation

  • 23 endpoint and graph tests, plus 39 existing namespace list/export/source tests, passed with Python 3.13 and an isolated PostgreSQL 17.6 database.
  • All server pre-commit checks passed for the changed Python files, including Ruff, mypy, formatting, and GraphQL schema generation.
  • Full CI passed on 83bc23c92ba9edd2a7b29256768e5ae03ac12762, including all server suites and combined coverage.

@philipfweiss philipfweiss changed the title [DJ Semantic Fingerprint 4] Add namespace fingerprint snapshots [DJ Semantic Fingerprint 4] Bulk endpoint for viewing fingerprints + testing fixtures Sep 2, 2026
@philipfweiss
philipfweiss marked this pull request as ready for review September 2, 2026 00:34
@philipfweiss
philipfweiss force-pushed the semantic-fingerprints-deployment-impact-api branch from 1c628be to d914195 Compare September 2, 2026 01:53
@philipfweiss
philipfweiss force-pushed the semantic-fingerprint-namespace-snapshots branch from b2407e9 to 113b682 Compare September 2, 2026 01:53
@philipfweiss
philipfweiss force-pushed the semantic-fingerprints-deployment-impact-api branch from d914195 to 63bf44c Compare September 2, 2026 19:50
@philipfweiss
philipfweiss force-pushed the semantic-fingerprint-namespace-snapshots branch from 113b682 to 2fde045 Compare September 2, 2026 19:54
@philipfweiss
philipfweiss force-pushed the semantic-fingerprints-deployment-impact-api branch from 63bf44c to 638e8b5 Compare September 3, 2026 01:29
@philipfweiss
philipfweiss force-pushed the semantic-fingerprint-namespace-snapshots branch from 2fde045 to 3f838b2 Compare September 3, 2026 01:30
@philipfweiss
philipfweiss force-pushed the semantic-fingerprints-deployment-impact-api branch from 638e8b5 to 84419d8 Compare September 3, 2026 19:27
@philipfweiss
philipfweiss force-pushed the semantic-fingerprint-namespace-snapshots branch from 3f838b2 to 765254e Compare September 3, 2026 19:27
@philipfweiss
philipfweiss force-pushed the semantic-fingerprints-deployment-impact-api branch from 84419d8 to 1d4520e Compare September 3, 2026 21:34
@philipfweiss
philipfweiss force-pushed the semantic-fingerprint-namespace-snapshots branch from 765254e to 43afda8 Compare September 3, 2026 21:34
Philip Weiss added 4 commits September 4, 2026 13:17
Return server-owned fingerprints and change tiers for deployment results and downstream impacts, including client parsing and unknown-state propagation.
Impact tests now derive expected hashes from complete graph snapshots, matching production parent resolution.
Recover per node during impact analysis so invalid SQL can produce unknown fingerprints without weakening normal deployment parsing.
@philipfweiss
philipfweiss force-pushed the semantic-fingerprints-deployment-impact-api branch from 1d4520e to 52d4f75 Compare September 4, 2026 20:21
@philipfweiss
philipfweiss force-pushed the semantic-fingerprint-namespace-snapshots branch from 43afda8 to da51e15 Compare September 4, 2026 20:21
Philip Weiss added 3 commits September 4, 2026 14:19
Canonicalize required-dimension identities during change detection so equivalent metric specs remain no-ops, and align deployment assertions with the additive fingerprint response fields.
Expose committed namespace-tree hashes so metadata files can bootstrap and reconcile outside deployment previews.
The namespace endpoint now evaluates one current graph and selects its requested rows from the memoized result.
@philipfweiss
philipfweiss force-pushed the semantic-fingerprints-deployment-impact-api branch from e137874 to e9cb0bf Compare September 11, 2026 16:25
Base automatically changed from semantic-fingerprints-deployment-impact-api to main September 11, 2026 17:20
Co-authored-by: Philip Weiss <pweiss@netflix.com>
shangyian and others added 4 commits September 11, 2026 13:51
Co-authored-by: GitHub Actions Bot <actions@github.com>
* Distinguish a re-deployed pre-existing failure from a new one

A node whose spec is unchanged but whose stored status is INVALID is
deliberately promoted into the update set so that the deployment gets a
chance to revalidate it. That is the right thing to do -- the node may
well have been broken by something outside this deployment that has since
been fixed -- but it made an already-broken, untouched node
indistinguishable in the response from one the author just broke. A
deployment then failed on nodes its change never touched.

Those nodes are now marked `revalidation_only`, so a caller can tell the
failures a deployment caused from the ones it inherited, and still sees
the recovery when a later deploy fixes the node's upstream.

The flag is not on its own enough to excuse a failure, and a later gate
must not treat it that way: it does not compare failure reasons, so a
node whose own spec never moved can fail for a new reason caused by an
edit upstream of it. Attribution has to be "changed, or reachable from
something changed", and the inherited breakage surfaces separately as a
downstream impact.

Additive and observational. Exit codes, gating, and overall pass/fail are
untouched, and the field is nullable so deployment rows persisted before
it existed still rehydrate.

* Trim the comments
Co-authored-by: GitHub Actions Bot <actions@github.com>
@netlify

netlify Bot commented Sep 14, 2026

Copy link
Copy Markdown

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit 83bc23c
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6aa8110bc344e60008228bcb

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.

2 participants