Skip to content

Load bounded hierarchical portable tool catalogs - #96

Open
omry wants to merge 1 commit into
pr95from
pr96
Open

Load bounded hierarchical portable tool catalogs#96
omry wants to merge 1 commit into
pr95from
pr96

Conversation

@omry

@omry omry commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Add injected-filesystem catalog loading with ownership and namespace discovery,
duplicate detection, reference-edge depth bounding, and release graph
validation. This is the slice that gives every validator built by PTD-04
through PTD-06 a production caller: loading a catalog now runs record-local
validation during decoding, the release index and resolved manifest graph per
tool, and therefore every target composition and fixture coverage check.

Four truth fixes, all required by the normative design.

The parked source declares four aggregate ceilings this loader does not: a
4096-record count limit, a 64 MB aggregate byte limit, a 65536 reference-edge
count limit, and a 4096 selected-contribution limit. The design defines no
aggregate ceiling on a definition as a whole, so extracting them would
reintroduce exactly what the design amendment removed, including the
closure-contribution cap that amendment was written to retire. Only
reference-edge depth survives, which the design lists among the per-unit
limits because it bounds recursion rather than declaring how large a catalog
may be.

The parked reference enumeration uses the obsolete singular target model, a
single integration fixture and a single artifact per binding. The accepted
model is plural on both and adds binding- and selection-scoped package sets, so
enumerating the parked shape would omit those edges from traversal and from
anything built on it. Enumeration now follows the landed types, and a binding
artifact's own contract reference is an edge as well.

Reading a record file is bounded by the same per-record byte limit decoding
applies, so an oversized file fails before it is fully resident rather than
after.

Depth traversal is deterministic: records are visited in sorted ID order, so a
cyclic or over-deep definition is reported identically on every run instead of
depending on map iteration.

The plan's PTD-07 wording said "reference edge and depth limits", which could
be read as licensing the aggregate edge-count ceiling the design does not
define. Tightened to "reference-edge depth limits" to match the design's
per-unit list.

@omry
omry changed the base branch from main to pr95 August 18, 2026 21:07
@omry
omry marked this pull request as ready for review August 18, 2026 21:08
@omry

omry commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review 35752e8

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector 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

Here are some automated review suggestions for this pull request.

Reviewed commit: 35752e88cf

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

Comment thread internal/toolcatalog/catalog.go Outdated
Comment thread internal/toolcatalog/catalog.go Outdated
Comment thread internal/toolcatalog/catalog.go Outdated
@omry

omry commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review b6ce4e8

@chatgpt-codex-connector chatgpt-codex-connector 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

Here are some automated review suggestions for this pull request.

Reviewed commit: b6ce4e8d43

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

Comment thread internal/toolcatalog/catalog.go Outdated
Comment thread internal/toolcatalog/catalog_test.go Outdated
Add injected-filesystem catalog loading with ownership and namespace discovery,
duplicate detection, reference-edge depth bounding, and release graph
validation. This is the slice that gives every validator built by PTD-04
through PTD-06 a production caller: loading a catalog now runs record-local
validation during decoding, the release index and resolved manifest graph per
tool, and therefore every target composition and fixture coverage check.

Four truth fixes, all required by the normative design.

The parked source declares four aggregate ceilings this loader does not: a
4096-record count limit, a 64 MB aggregate byte limit, a 65536 reference-edge
count limit, and a 4096 selected-contribution limit. The design defines no
aggregate ceiling on a definition as a whole, so extracting them would
reintroduce exactly what the design amendment removed, including the
closure-contribution cap that amendment was written to retire. Only
reference-edge depth survives, which the design lists among the per-unit
limits because it bounds recursion rather than declaring how large a catalog
may be.

The parked reference enumeration uses the obsolete singular target model, a
single integration fixture and a single artifact per binding. The accepted
model is plural on both and adds binding- and selection-scoped package sets, so
enumerating the parked shape would omit those edges from traversal and from
anything built on it. Enumeration now follows the landed types, and a binding
artifact's own contract reference is an edge as well.

Reading a record file is bounded by the same per-record byte limit decoding
applies, so an oversized file fails before it is fully resident rather than
after.

Depth traversal is deterministic: records are visited in sorted ID order, so a
cyclic or over-deep definition is reported identically on every run instead of
depending on map iteration.

The plan's PTD-07 wording said "reference edge and depth limits", which could
be read as licensing the aggregate edge-count ceiling the design does not
define. Tightened to "reference-edge depth limits" to match the design's
per-unit list.
@omry

omry commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review c4b2174

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: c4b2174502

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

@omry

omry commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

PR-cycle state — maintained automatically. Do not edit.

{
  "approval": {
    "approved_revision_fingerprint": "sha256:127a1674776da5ad2bcc1e9b0b62a9a097b0e443088bfef184bc4daa059f84eb",
    "evidence": {
      "delivery_deferral_ledger_digest": "sha256:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
      "required_checks": [
        [
          "Linux CI checks",
          "success"
        ],
        [
          "Target smoke (darwin-amd64)",
          "success"
        ],
        [
          "Target smoke (darwin-arm64)",
          "success"
        ],
        [
          "Target smoke (linux-amd64)",
          "success"
        ],
        [
          "Target smoke (linux-arm64)",
          "success"
        ],
        [
          "Windows host smoke (windows-amd64)",
          "success"
        ],
        [
          "Windows host smoke (windows-arm64)",
          "success"
        ]
      ],
      "review_request": {
        "body_digest": "sha256:ee9fb91a2d06f7d80efc940502e77476b8fdcc17b8ea61cc1d3c4a72b93f2178",
        "id": 5337614797
      },
      "review_result": {
        "body_digest": "sha256:c2571885b15b9f280769fc25bd157dc7b2295ef183c8cdfd8956e6a37b5a01f8",
        "id": 5337626787
      },
      "revision_fingerprint": "sha256:127a1674776da5ad2bcc1e9b0b62a9a097b0e443088bfef184bc4daa059f84eb",
      "thread_dispositions": {
        "resolved": 5,
        "total": 5
      }
    },
    "evidence_fingerprint": "sha256:3ae6775e9bfeb17bf11328733afcf3b96fad1515f90be821e96cec99774dba9b",
    "rounds": 3
  },
  "checks": {
    "conclusion": "success",
    "count": 7
  },
  "delivery_deferral_ledger_digest": "sha256:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
  "delivery_deferrals": [],
  "pull_request": {
    "base": {
      "ref": "pr95",
      "sha": "22cca582369a"
    },
    "head": {
      "ref": "pr96",
      "sha": "c4b217450202"
    },
    "number": 96,
    "repository": "github.com/omry/reploy"
  },
  "review": {
    "rounds": 3,
    "summary": "round 1: 3 findings (2 P1); round 2: 2 findings (1 P1); round 3 clean"
  },
  "revision_fingerprint": "sha256:127a1674776da5ad2bcc1e9b0b62a9a097b0e443088bfef184bc4daa059f84eb",
  "scope_authority": {
    "docs/PORTABLE_TOOL_DEFINITION_DESIGN.md": "sha256:9148c9398eb162f9597bf66d61adbbf27257b6ea6edca8d1b68e088ed04916e6",
    "docs/PORTABLE_TOOL_DEFINITION_IMPLEMENTATION_PLAN.md": "sha256:ae49b856a644489e7a49d87601b12469b45cb6060e80abf49eb9c866dcd48f5a"
  },
  "task": "PTD-07",
  "version": 1
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant