Skip to content

Fix imported source Markdown sharing#1043

Open
Jurij89 wants to merge 19 commits into
mainfrom
codex/issue-872-source-blob-sharing
Open

Fix imported source Markdown sharing#1043
Jurij89 wants to merge 19 commits into
mainfrom
codex/issue-872-source-blob-sharing

Conversation

@Jurij89

@Jurij89 Jurij89 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a demand-driven imported source Markdown blob fetch protocol so authorized SWM readers can hydrate missing Markdown bytes from the origin peer.
  • Binds raw blob requests to signed selector auth (assertionUri, blobHash, offset, maxBytes) and enforces public/open or private/curated authorization before metadata/blob disclosure.
  • Updates import-artifact routes to report local/fetchable/unavailable Markdown availability, cache only hash-verified bounded responses, and keep write/enrichment routes owner-only.

Related

Files changed

File What
packages/core/src/constants.ts Adds the imported source blob raw protocol constant.
packages/agent/src/dkg-agent-source-blob.ts Implements signed source blob fetch/responder logic, policy checks, durable metadata validation, and range reads.
packages/agent/src/imported-source-blob-wire.ts Adds typed request/response codec validation for source blob RPC.
packages/agent/src/dkg-agent-*.ts, packages/agent/src/sync/auth/* Wires source blob methods, types, lifecycle registration, signed selector digest fields, and forced curated read checks.
packages/cli/src/daemon/routes/assertion.ts Adds non-owner authorized Markdown hydration and availability metadata while preserving owner-only writes.
packages/cli/src/file-store.ts, packages/cli/src/daemon/lifecycle.ts Adds and registers bounded stat/readRange blob store support.
packages/agent/test/imported-source-blob.test.ts, packages/agent/test/sync-envelope-cursor.test.ts, packages/cli/test/* Adds protocol, authorization, hydration, range-read, digest-shape, and security regression coverage.
packages/*/vitest.unit.config.ts Includes the new/updated pure unit suites in no-Hardhat test lanes.

Test plan

  • cd packages/agent && pnpm exec vitest run --config vitest.unit.config.ts test/imported-source-blob.test.ts
  • cd packages/agent && pnpm exec vitest run --config vitest.unit.config.ts test/sync-envelope-cursor.test.ts test/imported-source-blob.test.ts
  • cd packages/cli && pnpm exec vitest run --config vitest.unit.config.ts test/file-store.test.ts test/import-artifact-routes.test.ts
  • pnpm --filter @origintrail-official/dkg-agent run build
  • pnpm --filter @origintrail-official/dkg run build

Notes

  • A generated local Hardhat deployment file (packages/evm-module/deployments/localhost_contracts.json) was modified by the local Hardhat setup attempt but intentionally not committed.

@Jurij89 Jurij89 force-pushed the codex/issue-872-source-blob-sharing branch from 2b2099c to 3b0fd30 Compare June 6, 2026 13:56
@Jurij89 Jurij89 marked this pull request as ready for review June 6, 2026 14:12
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/agent/src/dkg-agent-source-blob.ts
Comment thread packages/cli/src/daemon/routes/assertion.ts
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/agent/src/dkg-agent-types.ts Outdated
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/agent/src/dkg-agent-source-blob.ts
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts
Comment thread packages/agent/src/dkg-agent-types.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/agent/src/dkg-agent-source-blob.ts Outdated
Comment thread packages/agent/src/dkg-agent-source-blob.ts
Comment thread packages/agent/src/dkg-agent-source-blob.ts
Comment thread packages/cli/src/daemon/routes/assertion.ts
Comment thread packages/agent/src/dkg-agent-source-blob.ts
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated
Comment thread packages/cli/src/daemon/routes/assertion.ts Outdated

@github-actions github-actions 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 completed — no issues found.

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.

rc.12: imported Markdown source artifact is not replicated to peers for public/open CGs

1 participant