Skip to content

Add CI, CODEOWNERS, docs split and expand Trust Authority reference implementation with tests - #12

Merged
blocksifrdev merged 2 commits into
mainfrom
codex/revise-ttp-integration-plan-for-agt-jdgu0c
Apr 17, 2026
Merged

blocksifrdev merged 2 commits into
mainfrom
codex/revise-ttp-integration-plan-for-agt-jdgu0c

Conversation

@blocksifrdev

Copy link
Copy Markdown
Collaborator

Motivation

  • Prepare the repository for public release by adding governance, access-control, and onboarding artifacts to reduce security and operational risk.
  • Make operator and integrator guidance explicit by splitting and expanding docs for Getting Started, Operator Guide, ecosystem integrations, and public-release boundary.
  • Ensure protocol-critical code paths have maintainers and automated checks (CODEOWNERS + CI) so protocol/security changes receive appropriate review.
  • Harden and extend the Trust Authority reference implementation to include practical admin routes, tests, and crypto wiring needed for repeatable verification.

Description

  • Add a global .github/CODEOWNERS and a CI workflow .github/workflows/ci.yml that builds and runs tests for reference-implementations/trust-authority on PRs and pushes.
  • Replace and expand high-level docs and onboarding material: CONTRIBUTING.md, README.md updates, SECURITY.md, and many new docs under docs/ (getting-started.md, operator-guide.md, integration-guide.md updates, ecosystem-integrations.md, open-source-boundary.md, public-readiness.md, repo-access-control.md, roadmap.md).
  • Rationalize language/semantics artifacts by trimming and refocusing ttp-language / ttp-language.md to a practical language/semantics spec aligned with implemented protocol fields.
  • Enhance the Trust Authority reference implementation: add jest.config.cjs, unit test src/aggregation.test.ts, package.json updates (deps/devDeps including @noble/hashes, @types/jest), fix ed.etc.sha512Sync usage in crypto.ts, index.ts, and scripts, adjust tsconfig.json, and add admin features in store.ts (listAgents, getAgentReceiptsAcrossDomains) and routes.ts (GET /v1/admin/agents with optional metrics).

Testing

  • Added unit tests under reference-implementations/trust-authority/src/aggregation.test.ts and configured Jest via reference-implementations/trust-authority/jest.config.cjs to run npm test for the Trust Authority.
  • CI job (.github/workflows/ci.yml) builds (npm run build) and runs tests (npm test) for the Trust Authority reference implementation on PRs and pushes.
  • Executed npm run build and npm test for reference-implementations/trust-authority as part of validation and the test suite completed successfully.

Codex Task

@blocksifrdev
blocksifrdev merged commit baf11b7 into main Apr 17, 2026
1 check passed
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

https://github.com/blocksifrdev/ttp-protocol/blob/abc6de5353c343cf5fd1b4ed8c92d78a6ac2d542/reference-implementations/trust-authority/src/store.ts#L144-L146
P2 Badge Match receipts by exact agent ID in metrics lookup

getAgentReceiptsAcrossDomains uses key.startsWith(${agentId}:), but agent IDs are accepted as arbitrary strings (including :), so querying metrics for agent will also pull receipts for agents like agent:shadow. This causes /v1/admin/agents?include_metrics=true to report inflated/misattributed receipt counts and timestamps, which can mislead operator decisions (for example, quarantine or trust investigations). Use a collision-safe keying strategy (e.g., nested maps keyed by agent_id and domain, or parse/split and compare exact agent_id) instead of prefix matching.

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

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