Skip to content

Add product visual design memory#21

Merged
hudsonaikins merged 13 commits into
mainfrom
codex/principal-design-memory
Jul 17, 2026
Merged

Add product visual design memory#21
hudsonaikins merged 13 commits into
mainfrom
codex/principal-design-memory

Conversation

@hudsonaikins

@hudsonaikins hudsonaikins commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add repository-level product design memory contracts and durable visual evidence tooling
  • require exact-commit visual review and baseline integrity
  • preserve repository attribution and immutable validation dependencies
  • enforce unique capture matrices and changed-code quality baselines

Validation

  • exact head da9a2ce1e6dcd5b7ced065d7386ca4fbf65f240a
  • remote Quality passed
  • remote exact-head product validation passed
  • 98/98 tests passed locally
  • Fallow changed-code gate passed
  • required validators passed; cost telemetry complete: $0
  • evidence artifact digest: sha256:2ec4bd24dfa60b8b2f64331de3e7704f914c960d0fcc5025053d73380c318bde
  • current visual baseline approved by product owner on 2026-07-16
  • all actionable review threads resolved

Rollout boundary

Merge authorized. Deployment remains separately gated.

@hudsonaikins
hudsonaikins marked this pull request as ready for review July 17, 2026 02:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 192e39c363

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/product-validation.yml Outdated
Comment thread .github/workflows/product-validation.yml Outdated
Comment thread scripts/lib/design-memory.mjs Outdated
Comment thread .github/workflows/product-validation.yml Outdated

Copy link
Copy Markdown
Contributor Author

@codex review

@hudsonaikins
hudsonaikins marked this pull request as draft July 17, 2026 02:58
@hudsonaikins
hudsonaikins marked this pull request as ready for review July 17, 2026 02:58
@hudsonaikins
hudsonaikins merged commit c478983 into main Jul 17, 2026
4 checks passed
@hudsonaikins
hudsonaikins deleted the codex/principal-design-memory branch July 17, 2026 03:00

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: da9a2ce1e6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

boolean(value.required, `${path}.required`);
member(value.status, ["passed", "failed", "blocked", "skipped"], `${path}.status`);
boundedUniqueStrings(value.reasons, `${path}.reasons`, { minimum: 0, maximum: 128 });
if (value.evidence === null) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require evidence before accepting passed typed validators

For a v0.3 result supplied by another producer or restored into the ledger, a required non-static validator can set status: "passed" and evidence: null; this early return accepts it, and a recomputed integrity digest and decision then let latestValidationResult() expose the whole result as passed. Since non-static validators require trustworthy evidence, only blocked/skipped results should be allowed to omit it.

Useful? React with 👍 / 👎.

Comment on lines +64 to +66
uniqueStringArray(surface.viewports, `${label}.viewports`, 1, 20);
uniqueStringArray(surface.themes, `${label}.themes`, 1, 3);
uniqueStringArray(surface.states, `${label}.states`, 1, 50);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject capture matrices larger than the manifest limit

These per-dimension limits allow profiles whose Cartesian capture matrix exceeds the baseline manifest's 500-capture maximum—for example, one surface with 4 viewports, 3 themes, and 50 states requires 600 captures. Such a profile passes validateProductDesignProfile(), but finalizeVisualCaptures() necessarily emits more than 500 entries and then fails validateVisualBaselineManifest(), so no valid baseline can ever be finalized; validate the aggregate matrix size up front.

Useful? React with 👍 / 👎.

Comment on lines +149 to +152
const commandResult = await runValidationCommand(definition, workspace, home);
commands.push(commandResult);
const gateStatus = typed
? await appendValidatorResult(validators, definition, commandResult, workspace)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove pre-existing evidence before running validators

When the declared evidence path is already tracked in the validated commit, a validator command that merely exits zero can reuse that committed report because the runner never removes or marks it before execution. This lets stale semantic, visual, or operational metrics pass every later exact-head validation without the adapter emitting fresh evidence, contrary to the typed-validator contract; clear the declared output before launching the command or otherwise prove it was produced by this run.

Useful? React with 👍 / 👎.

theme,
state,
artifact: {
uri: new URL(basename(filename), `${baseUri.toString().replace(/\/?$/, "/")}`).toString(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Encode capture filenames when constructing artifact URIs

Profile IDs and states permit URL metacharacters, so a valid capture such as home--desktop--light--signed#in.png is found and hashed but new URL() interprets #in.png as a fragment; ? similarly becomes a query. The emitted durable URI therefore points to a different artifact path even though its digest and byte count describe the local file, so encode the filename as a path segment or reject unsafe matrix identifiers.

Useful? React with 👍 / 👎.

Comment on lines +5 to +6
push:
branches: [main]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use the previous revision as the base for main pushes

On a push to main, checkout makes both HEAD and origin/main resolve to the newly pushed commit, while the committed manifest has requireEntireCheckpoint: true. The runner therefore examines an empty origin/main..HEAD range and throws before executing any validator, so this workflow's main-push path cannot pass; use the push event's previous commit as the base or restrict this workflow to pull requests.

Useful? React with 👍 / 👎.

const actual = sha256(bytes);
if (actual !== source.digest) blockers.push(`source digest mismatch: ${source.path}`);
}
for (const decision of profileValue.sources.decisions) await readFile(containedPath(root, decision, "decision"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bind decision documents to the design profile by digest

When a referenced decision document changes, this loop only confirms that the path remains readable, unlike token and component sources whose bytes are checked against committed digests. A decision-only change therefore leaves the profile digest and approved baseline valid and inspectDesignMemory() still reports design_memory_ready, even though part of the claimed design authority has drifted; record and verify decision digests as well.

Useful? React with 👍 / 👎.

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