feat: add deterministic operation catalog foundation - #325
Merged
Conversation
Joncallim
force-pushed
the
codex/issue-201-operation-catalog
branch
3 times, most recently
from
August 7, 2026 02:44
8d9a57e to
4b2017d
Compare
Joncallim
changed the base branch from
agent/normalize-execution-outcomes
to
main
August 7, 2026 07:15
…r functions
New PL/pgSQL functions default to PUBLIC EXECUTE in Postgres unless
explicitly revoked, matching every other custom routine in this codebase
(e.g. migration 0025's REVOKE ALL ... FROM PUBLIC for
forge_epic_172_reject_mutation_v1, and the block of REVOKEs in migration
0027). Migration 0030 skipped this for its three new trigger functions,
so forge_project_root_reconciler picked up implicit EXECUTE via PUBLIC and
failed the closed root-reconciler effective-privilege allowlist proof in
CI ("unexpected": [...forge_guard_operation_event_insert_v1, ...]).
drizzle-orm (^0.45.2) wraps every failed query in a DrizzleQueryError whose message is a generic "Failed query: insert into ... params: ..." dump; the actual driver/database error -- e.g. the text a trigger raises via RAISE EXCEPTION, such as "operation run events must be appended in phase order" -- is only reachable via `.cause`. appendEvent and finalize now unwrap it, so callers (and operators reading logs) see the real rejection reason instead of an opaque wrapper. Caught by operation-ledger.postgres.test.ts's live-Postgres proof, which asserts on that exact trigger message.
Joncallim
force-pushed
the
codex/issue-201-operation-catalog
branch
from
August 7, 2026 07:15
f787587 to
d2b12c4
Compare
Joncallim
marked this pull request as ready for review
August 7, 2026 07:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #201.
This draft adds the first bounded foundation for Forge's deterministic Operation Catalog:
Safety boundaries
always_allowfilesystem.project.readgrant.allow_oncefails closed because this slice does not atomically consume it.--no-ext-diff --no-textconv; a malicious textconv regression proves repository configuration cannot execute a helper.Validation
0030_operation_runs.Stack and follow-ons
This PR previously stacked on draft PR #324, which has since merged; this branch is now retargeted directly onto
main.This PR intentionally does not close #201. Follow-ons before full issue closure include:
executeTrustedOperationto the normal task/model worker path;