Repository navigation
feat(build-notes): draft workflow builds in hidden, agent-only build notes - #10193
myxamediyar wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] This PR appears safe to merge. SummaryAdds hidden workflow build notes so Copilot can draft, check, and apply a planned build while tracking edits made by people.
No new actionable issues found.
|
There was a problem hiding this comment.
All reported issues were addressed across 48 files
This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.
Turn on auto-fix | Re-trigger cubic
ff6a245 to
1d34bab
Compare
|
@cubic-dev-ai review this PR |
@myxamediyar I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@myxamediyar I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 50 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
b094961 to
f0adcf2
Compare
|
@cubic-dev-ai review this PR |
@myxamediyar I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 50 files
Confidence score: 4/5
- In
apps/sim/lib/build-notes/content.ts, notes can be written withnotes.baselineFileIdnull, leaving an incomplete row that can be evaluated without a baseline. Reject the write and direct callers to runbuild-notes rebasefirst.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/build-notes/content.ts">
<violation number="1" location="apps/sim/lib/build-notes/content.ts:21">
P2: A notes write is accepted while `notes.baselineFileId` is null. Refuse it and direct the caller to run `build-notes rebase` before editing notes, so an incomplete notes row cannot be evaluated without a baseline.
(Based on your team's feedback about requiring a baseline before guarded writes.)</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@myxamediyar I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 50 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@myxamediyar I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 50 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@myxamediyar I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 50 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
…notes Behind the build-notes feature flag, Chat drafts a workflow build in build-notes/<workflowId>.md before it changes the graph, and Sim keeps the sanitized graph of its last build beside it as build-notes/<workflowId>.baseline.json. - workflow_build_notes owns both files; they never appear in Files and only Copilot reaches them - build_notes service: create, status, evaluate (dry-run of the notes' operations block plus open placeholders and items), apply, changes, rebase - a Copilot apply or state replace on a workflow with notes must be the evaluated batch, from unchanged notes, on a graph unchanged since the baseline; a person's edit is never refused and shows up in changes - evaluation holds a build only for lint its batch adds - archive and restore carry the notes; the file ownership functions admit the build_notes context
…ghten review findings - spend the evaluation and re-check the baseline inside the write transaction; notes writes spend it too, so a build racing a notes edit is refused - record the baseline from the build's own commit (afterWrite hook) - refuse a Copilot whole-graph replace on a workflow with notes, and a build with no baseline - detect credential switches through salted hashes of withheld values - compare lint findings by block id, as counts - restore build notes with a restored folder; skip the archive step on a schema that predates the table - read the baseline in one snapshot, refuse oversize baselines, anchor the operations fence, accept any list marker for open items
…s monotonic - archive the workflow rows, then build-notes files, then notes rows: the order builds (workflow, notes) and notes writes (file, notes) already take - record a baseline only if it is not older than the recorded one, rolling back its file write otherwise - a failing evaluation withdraws an earlier pass - refuse NUL bytes in notes; hash cleared block data values too
…nt builds and archives - record a passing evaluation only while its baseline is still the recorded one - create notes and baseline files under a shared lock on the live workflow row - hand build-notes files to the workspace when their creator's account goes
…'s evaluation honest
…ck a baseline before creating notes
0763144 to
b11250d
Compare
|
@cubic-dev-ai review this PR |
@myxamediyar I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 50 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
Summary
build-notesfeature flag (off by default; global and per-organization rollout)build-notes/<workflowId>.mdbefore it changes the graph; Sim keeps the sanitized graph of its last build beside it inbuild-notes/<workflowId>.baseline.jsonworkflow_build_notestable owns both files (owned-file contextbuild_notes): never listed in Files, reachable only by Copilot (people and API keys get not found), archived and restored with the workflow, never copied by duplicate, fork or exportbuild_notesCopilot service:create,status,evaluate(dry-runs the notes' operations block and lists open<<open:…>>placeholders,[gather]/[ask]items, skipped operations, input errors, and lint the batch adds),apply(builds from the evaluated block, atomically),changes(redacted diff since the baseline, ignoring layout),rebaseoperations applyorstate replaceis refused unless it is the evaluated batch, from notes unchanged since evaluation, on a graph unchanged since the baseline; each build spends the evaluation and moves the baseline. A person's edit (editor or API) is never refused; it shows up inchangesworkflow_build_notesand lets the file ownership functions admit thebuild_notescontext (reconcile-file-ownershipreplays them for push-provisioned databases)listWorkflowLintFindingslets evaluation compare a batch's lint with the saved graph'sType of Change
Testing
lib/build-notes/build-notes.integration.ts(10 checks, real Postgres): hidden files and person access, baseline write refusal, evaluation, exact-batch builds, edited-notes refusal, a person's edit and its reconciliation, lint the batch adds vs. lint already in the graph, content-gate refusal, flag off, archive and restore with file history. Disabling the agent-only access check and the apply guard turns their checks redlib/build-notes/agent-path.integration.ts: the whole loop throughsim_clias Chat sends it (24 calls:workflows create,build-notes create/evaluate/apply/status/changes/rebase,files read/edit), with a JSON transcript intest-results/build-notes-agent.json. It caught two bugs fixed here: the template's own example placeholder blocked every evaluation, and lint from a person's unfinished edit blocked the agent's buildsbun run test(3777 files pass),bun run lint,bun run type-check,bun run check:audits,bun run check:migrations origin/staging, block registry check, drizzle-kit generate (no drift)Checklist
test-auditauthoring gate)