Skip to content

Add BlockSiFr Agent Trust Infrastructure baseline: specs, SDKs, reference gate, CI, and workflow hardening - #32

Merged
blocksifrdev merged 2 commits into
mainfrom
codex/refactor-repository-for-blocksifr-agent-trust-infrastructure-0mlmvs
Apr 25, 2026
Merged

blocksifrdev merged 2 commits into
mainfrom
codex/refactor-repository-for-blocksifr-agent-trust-infrastructure-0mlmvs

Conversation

@blocksifrdev

Copy link
Copy Markdown
Collaborator

Motivation

  • Establish a baseline runtime "trust-before-execution" platform for governed actions including protocol specs, SDKs, a reference FrontDesk (runtime authority gate), and integration examples.
  • Provide a reproducible local reference implementation and CI smoke-tests so integrators can validate POST /re/authorize semantics and receipt generation.
  • Harden the existing GitHub Actions governed-execution workflow to be robust to empty diffs and misconfiguration and to surface local/no-op receipts.

Description

  • Add canonical specifications under specs/ for TTP, SCIM-RE, RAP, POST /re/authorize, ExecutionReceipt, trust decay, and runtime-authority prompt.
  • Add Node and Python SDKs under sdk/node and sdk/python, with README, models, and client helper functions, and wire a python -m py_compile sdk/python/client.py compile check.
  • Add a minimal reference runtime authority gate at reference-implementations/runtime-authority-gate that implements GET /healthz and POST /re/authorize, produces structured ExecutionReceipts with integrity.chainHash, and includes unit/integration tests server.test.mjs.
  • Add repository-level artifacts: docs (docs/*), examples (examples/*), CHANGELOG.md, and a CI workflow .github/workflows/ci.yml that runs npm test, compiles the Python SDK, and performs end-to-end smoke checks using the reference gate with both Node and Python SDK calls, and update governed_execution.yml to improve changed-file serialization, provide local fallback receipts, handle missing RUNTIME_AUTH_URL, and respect step-up approvals.

Testing

  • Added and executed Node tests via npm run test which runs test:trust-routing and the new test:runtime-authority-gate, and those test suites completed successfully.
  • Added an integration smoke test in CI that starts reference-implementations/runtime-authority-gate/server.mjs and validates /healthz and /re/authorize with both the Node SDK (sdk/node) and Python SDK (sdk/python), and the smoke checks passed.
  • Added a Python compile check run via python -m py_compile sdk/python/client.py in CI, and the compile check succeeded.
  • Updated governed_execution.yml to surface robust outputs for automated runs and unit-tested the behavior locally using the new reference gate tests which succeeded.

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

https://github.com/blocksifrdev/ttp-protocol/blob/63d81c990526758ab81e800aacbd8d7ccdefe516/reference-implementations/runtime-authority-gate/server.mjs#L115
P1 Badge Reject non-numeric trust scores before policy checks

trustScore is coerced with Number(...) but never checked for finiteness, so non-numeric inputs become NaN and all threshold comparisons (< 0.4, < 0.65, < 0.85) evaluate false. For an in-scope request this can fall through to PERMIT/FULL instead of denying or stepping up, which bypasses the trust gate on malformed input rather than failing closed.


https://github.com/blocksifrdev/ttp-protocol/blob/63d81c990526758ab81e800aacbd8d7ccdefe516/.github/workflows/governed_execution.yml#L145-L147
P1 Badge Fail closed when runtime authority endpoint is missing

This branch explicitly exits successfully when receipt is local-missing-auth-url; combined with the earlier AUTH_URL-missing path, the workflow passes without any external authorization. In environments where RUNTIME_AUTH_URL is unset (for example PR contexts without secrets), governed execution is silently bypassed instead of being denied.

ℹ️ 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".

@blocksifrdev
blocksifrdev merged commit b2cefe0 into main Apr 25, 2026
3 checks passed
@blocksifrdev
blocksifrdev deleted the codex/refactor-repository-for-blocksifr-agent-trust-infrastructure-0mlmvs branch April 25, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant