Skip to content

pctx_codegen v0.3.3

Choose a tag to compare

@eliasposen eliasposen released this 31 Jul 19:53
· 7 commits to main since this release

Bug Fixes

  • report degraded tool types to the caller
    Two follow-ups from review:

    • Codegen degradation to any only reached the logs, so a client
      registering tools against a remotely deployed session server had no way
      to learn its tool lost its types. Tool now records why each schema was
      degraded, CallbackReport carries them as warnings, and
      /register/tools returns them alongside failed.
    • with_callbacks swallowed the CallbackReport from add_callbacks,
      hiding both failures and warnings from the builder-style caller. It now
      returns (Self, CallbackReport). Breaking, and infallible: per-tool
      isolation means the batch cannot fail, so the report is the only
      outcome.
  • isolate per-tool registration failures
    /register/tools failed the whole batch when a single tool's schema
    couldn't be typed by our codegen (e.g. a recursive $ref). The portal
    federates arbitrary upstream JSON Schema, so this fired constantly: in
    prod each session degraded to ~135 sequential per-tool register calls
    (~6.4s, ~274 daily 500s) instead of one batch call.

    Fix it at the layer that owns the problem:

    • Codegen never fails a tool over typing. Tool::new is infallible;
      generate_types failures degrade to a permissive any signature
      (with a warning) so the tool stays callable, just untyped.
    • Registration isolates per-tool. add_callbacks returns a
      CallbackReport { registered, failed } instead of bubbling the first
      error; a genuinely bad tool (name clash, unparseable schema) is
      skipped and reported, never aborts the batch. The handler returns 200
      with the report.

    The portal's existing batch call now succeeds, so its per-tool fallback
    never triggers — no portal change required to fix prod.

Commit Statistics

  • 4 commits contributed to the release.
  • 9 days passed between releases.
  • 2 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge branch 'main' into fix/concurrency (369d302)
    • Merge pull request #136 from portofcontext/fix/register-tools-per-tool-isolation (5269d81)
    • Report degraded tool types to the caller (6ec9687)
    • Isolate per-tool registration failures (d42790b)