Skip to content

fix(contracts): remove the duplicate advertisedOutputJsonSchema declaration - #11057

Merged
morluto merged 1 commit into
mainfrom
fix/duplicate-advertised-output-schema
Nov 15, 2026
Merged

morluto merged 1 commit into
mainfrom
fix/duplicate-advertised-output-schema

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Main typechecks again. #11005 left two exported declarations of advertisedOutputJsonSchema in src/contracts/toolSchemaMetadata.ts. This keeps the general one and removes the other.

Problem and expected behavior

On main at 08420be, npm run check:fast fails with TS2451: Cannot redeclare block-scoped variable 'advertisedOutputJsonSchema' at src/contracts/toolSchemaMetadata.ts:145 and :185. Every local merge gate that runs check:fast against main is refused for this, unrelated to the PR it checks (for example #11038, #11039, #11041 and #11049 in the auto-merge log).

Change and scope

  • Remove the first declaration, which hard-codes the draft-2020-12 target.

  • Keep the second, whose optional target defaults to draft-2020-12, so every existing call projects the same schema. Its documentation now includes the first one's note about the canonical full output profile.

  • Not included: any other contract change.

  • Contribution scope: not applicable (compile fix within an existing module).

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/contracts/toolSchemaMetadata.ts remains the single owner of advertised output schemas.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: none added; the existing contract tests cover the function.
  • Base reproduction or other evidence: npm run check:fast on main fails with the two TS2451 errors above; with this change it passes.
  • User-visible CLI/MCP output (if applicable): not applicable.
  • Remaining proof gaps: none known.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run check:fast: failed on main (TS2451 twice); passes with this change.
  • npm run test:local -- src/application/analysisView/BrowserScenarioViews.test.ts src/contracts/analysisDetail.test.ts src/contracts/outputSchemaDefinitions.test.ts: 29 passed.
  • node scripts/verify/architecture-guards.mjs and npx oxfmt --check src/contracts/toolSchemaMetadata.ts: passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable; compile fix only.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no new authority, process, file or network effect.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

…ration

#11005 left two exported declarations of advertisedOutputJsonSchema in
src/contracts/toolSchemaMetadata.ts, so main no longer typechecks
(TS2451). The second declaration takes an optional target that defaults
to the first one's fixed draft-2020-12, so it covers every caller. The
first is removed and its documentation moves onto the remaining one.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T11:20:17.625113Z
We couldn’t complete this review. Comment @codex review to try again.
e39154f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto merged commit 1151763 into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the fix/duplicate-advertised-output-schema branch November 15, 2026 11:21
@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Low impact] This focused cleanup appears safe to merge.

Summary

Removes the duplicate advertisedOutputJsonSchema declaration and keeps its full-profile explanation on the remaining helper.

  • The advertised output schema now has one target-aware declaration.

Reviews (1) · Last reviewed commit: "fix(contracts): remove the duplicate adv..." · Reviewed by Greptile

@morluto morluto added area: domain Domain logic, errors, and pure functions bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant