Skip to content

Adopt AST control plane artifacts in workbench - #76

Merged
mikeylong merged 7 commits into
mainfrom
codex/ui-ast-platform-evolution
Mar 29, 2026
Merged

mikeylong merged 7 commits into
mainfrom
codex/ui-ast-platform-evolution

Conversation

@mikeylong

Copy link
Copy Markdown
Collaborator

Summary

  • adopt the generic UI AST control-plane artifacts in the SurfaceOps local workbench without making SurfaceOps the owner of AST semantics
  • freeze integration evidence and promotion records beside published UI AST snapshots
  • extend the shared consumer smoke so benchmark and reference-target both prove the same lifecycle, proposal, integration, and observation bundle conventions

Dependency

Testing

  • pnpm --filter surfaceops-web type-check
  • SURFACES_INTERFACECTL_ROOT=/Users/mike/SurfacesPlatform/interfacectl/.worktrees/ui-ast-platform-evolution pnpm --filter surfaceops-web exec vitest run tests/local-workbench-service.test.ts tests/local-workbench.test.tsx tests/local-workbench-routes.test.ts
  • SURFACES_INTERFACECTL_ROOT=/Users/mike/SurfacesPlatform/interfacectl/.worktrees/ui-ast-platform-evolution node --test scripts/tests/generation-adapter.test.mjs

@vercel

vercel Bot commented Mar 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
interfacectl.com Ready Ready Preview, Comment Mar 29, 2026 7:17pm
reference-target-web Ready Ready Preview, Comment Mar 29, 2026 7:17pm
surfaceops.ai Ready Ready Preview, Comment Mar 29, 2026 7:17pm
surfaces.dev Ready Ready Preview, Comment Mar 29, 2026 7:17pm
surfaces.systems Ready Ready Preview, Comment Mar 29, 2026 7:17pm

Request Review

@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: f734eb2dfe

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

function generatedAstPath(surfaceId: string): string {
return join(GENERATED_DIR, `${surfaceId}.ui.surface.ast.json`);

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 Normalize bootstrapSurfaceId before resolving artifact paths

loadBootstrapGovernanceHandoff is fed by the bootstrapSurfaceId query param on the governance page, but generatedAstPath interpolates that value directly into a filesystem path. A crafted value containing path traversal segments (for example ../) can make the page probe/read files outside contracts/generated, because existsSync/readFileSync are executed on the joined path. Please normalize/validate the surface id (e.g., with the existing surface-id normalizer and separator checks) before using it in path construction.

Useful? React with 👍 / 👎.

export async function loadLocalWorkbenchData(): Promise<LocalWorkbenchData> {
const session = await loadOrInitContractSession();
const contract = summarizeContract(session.workingContract);
const canonicalAst = await readJsonFile<UiAstDocument>(session.canonicalAstPath);

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 Fall back when canonicalAstPath points to a stale session path

The workbench now always loads canonicalAst from session.canonicalAstPath, but session files persist absolute paths that can become stale when the repo location changes (or when an old session references a non-existent AST path). In that case loadLocalWorkbenchData throws before rendering the page. This is a regression in page-load robustness; add an existence check and fall back to loadCanonicalTargetAst()/resolved target path instead of hard-failing.

Useful? React with 👍 / 👎.

This branch was successfully deployed

5 active deployments
Preview – surfaceops.ai — 0dcd92da Deployed Mar 29, 2026 by vercel[bot]
Preview – surfaces.systems — 0dcd92da Deployed Mar 29, 2026 by vercel[bot]
Preview – reference-target-web — 0dcd92da Deployed Mar 29, 2026 by vercel[bot]
Preview – surfaces.dev — 0dcd92da Deployed Mar 29, 2026 by vercel[bot]
Preview – interfacectl.com — 0dcd92da Deployed Mar 29, 2026 by vercel[bot]
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