Skip to content

Fix fdc3-context typegen to resolve AppIdentifier ref locally - #2156

Open
Roaders wants to merge 1 commit into
mainfrom
context-build-fixes
Open

Fix fdc3-context typegen to resolve AppIdentifier ref locally#2156
Roaders wants to merge 1 commit into
mainfrom
context-build-fixes

Conversation

@Roaders

@Roaders Roaders commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Previously, npm run clean followed by npm run build failed across the whole monorepo. The fdc3-context typegen script did not pass fdc3-schema's api.schema.json as a local schema source, so quicktype fell back to fetching the cross-package $ref for AppIdentifier over the network from an unpublished $id URL. That fetch failure was silently swallowed by s2tQuicktypeUtil.cjs's use of exec(), leaving generated/context empty and breaking every downstream package that depends on @finos/fdc3-context.

  • Pass ../../fdc3-schema/schemas/api/api.schema.json as an additional local schema source in fdc3-context's typegen script, mirroring the pattern fdc3-schema already uses in the opposite direction.
  • Regenerate ContextTypes.ts, picking up the Security & Identity documentation link path fix (/docs/next/api/security) that had not been reflected in the previously committed generated file.
  • Add CHANGELOG entries.

Contributor License Agreement

  • I acknowledge that a contributor license agreement is required and that I have one in place or will seek to put one in place ASAP.

Review Checklist

  • Issue: If a change was made to the FDC3 Standard, was an issue linked above?
  • CHANGELOG: Is a CHANGELOG.md entry included?
  • API changes: Does this PR include changes to any of the FDC3 APIs (DesktopAgent, Channel, PrivateChannel, Listener, Bridging)?
    • Docs & Sources: If yes, were both documentation (/docs) and sources updated?

      JSDoc comments on interfaces and types should be matched to the main documentation in /docs
    • Conformance tests: If yes, are conformance test definitions (/toolbox/fdc3-conformance) still correct and complete?

      Conformance test definitions should cover all required aspects of an FDC3 Desktop Agent implementation, which are usually marked with a MUST keyword, and optional features (SHOULD or MAY) where the format of those features is defined
    • Schemas: If yes, were changes applied to the Bridging and FDC3 for Web protocol schemas?

      The Web Connection protocol and Desktop Agent Communication Protocol schemas must be able to support all necessary aspects of the Desktop Agent API, while Bridging must support those aspects necessary for Desktop Agents to communicate with each other
      • If yes, was code generation (npm run build) run and the results checked in?

        Generated code will be found at /src/api/BrowserTypes.ts and/or /src/bridging/BridgingTypes.ts
  • Context types: Were new Context type schemas created or modified in this PR?
    • Were the field type conventions adhered to?
    • Was the BaseContext schema applied via allOf (as it is in existing types)?
    • Was a title and description provided for all properties defined in the schema?
    • Was at least one example provided?
    • Was code generation (npm run build) run and the results checked in?

      Generated code will be found at /src/context/ContextTypes.ts
  • Intents: Were new Intents created in this PR?

THIS SOFTWARE IS CONTRIBUTED SUBJECT TO THE TERMS OF THE FINOS CORPORATE CONTRIBUTOR LICENSE AGREEMENT.

THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.

@Roaders
Roaders requested a review from a team as a code owner August 28, 2026 08:17
@netlify

netlify Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploy Preview for fdc3 canceled.

Name Link
🔨 Latest commit c11a471
🔍 Latest deploy log https://app.netlify.com/projects/fdc3/deploys/6a91450fc92861000896af6d

Previously, npm run clean followed by npm run build failed across the
whole monorepo. The fdc3-context typegen script did not pass
fdc3-schema's api.schema.json as a local schema source, so quicktype
fell back to fetching the cross-package $ref for AppIdentifier over
the network from an unpublished $id URL. That fetch failure was
silently swallowed by s2tQuicktypeUtil.cjs's use of exec(), leaving
generated/context empty and breaking every downstream package that
depends on @finos/fdc3-context.

- Pass ../../fdc3-schema/schemas/api/api.schema.json as an additional
  local schema source in fdc3-context's typegen script, mirroring the
  pattern fdc3-schema already uses in the opposite direction.
- Regenerate ContextTypes.ts, picking up the Security & Identity
  documentation link path fix (/docs/next/api/security) that had not
  been reflected in the previously committed generated file.
- Add CHANGELOG entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov-commenter

codecov-commenter commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (cb00631) to head (c11a471).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2156   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files          73       73           
  Lines        4251     4251           
  Branches      596      596           
=======================================
  Hits         4040     4040           
  Misses        211      211           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Roaders
Roaders force-pushed the context-build-fixes branch from db14139 to c11a471 Compare August 28, 2026 08:21

@elkampu elkampu 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.

LGTM. I independently reproduced the failure and fix with Node 24.18.0/npm 11.10.0: at base cb00631, a clean fdc3-context build fails resolving ../api/api.schema.json and produces no generated output; at c11a471, the same clean build resolves AppIdentifier from the added local schema source and completes successfully. The regenerated AppIdentifier shape matches api.schema.json, the security-link output matches its schema sources, and all 39 context-schema tests pass.

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.

3 participants