Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[scanner] Issue-based architecture import can never pass the catalog contract (sourceCommit provenance mismatch)

Closed Beginner friendly
#823 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
ci-cd, testing

Research direction

Start with tests/architecture-catalog-contract.test.mjs, especially lines 100-102 and 184-187, then compare the issue-originated record in scripts/import-architecture-issue.mjs:124-145 with the upstream path in scripts/import-architectures.mjs:124. Run npm run test:unit and verify both provenance variants pass, including the issue-originated fixture and its generated documentation citation.

Written by the indexing model from the issue text.

Description

agent/scanner bug hive/hosted-available-lke648397-260827-5n31

Finding

scripts/import-architecture-issue.mjs (added in #805) writes catalog records with sourceIssue and an issue-URL sourceUrl, but no sourceCommit. tests/architecture-catalog-contract.test.mjs requires every catalog record to have:

  • sourceCommit matching /^[0-9a-f]{40}$/ (test at lines 100-102)
  • sourceUrl starting with https://github.com/cncf/architecture/ (same test)
  • a doc page that cites sourceCommit (test at lines 184-187)

The contract models only the upstream cncf/architecture import path (scripts/import-architectures.mjs:124 sets sourceCommit from the upstream commit). Issue-originated submissions have no upstream commit, so every issue-based submission fails npm run test:unit inside architecture-submission.yml before the PR is ever created. The label-gated submission pipeline added in #805 is end-to-end broken even after the trigger fix in #815.

Steps to Reproduce / Evidence

Run 36493874079 (2026-09-28T22:41Z, issues: labeled on #813, first run after #815 merged):

  1. Import step succeeded: Imported reference architecture "project-bluefin" from issue #813
  2. npm run test:unit failed with exactly three contract violations, all on the new record:
    • project-bluefin: sourceCommit must be a string (actual: undefined)
    • project-bluefin: sourceCommit must be a full 40-character SHA
    • project-bluefin: doc page does not cite sourceCommit undefined

Code: record literal at scripts/import-architecture-issue.mjs:124-135 contains sourceUrl (the issue URL) and sourceIssue, no sourceCommit; the generated doc page (line 145) cites the issue, not a commit.

Recommendation

Make the catalog contract a two-variant provenance model instead of forcing issue submissions to impersonate upstream imports:

  • Records with sourceCommit (upstream imports): keep the existing assertions unchanged.
  • Records with sourceIssue (community submissions): assert sourceIssue is a positive integer, sourceUrl points at that issue in cncf/endusers, and the doc page cites the issue (the generated page already does).

A single PR touching tests/architecture-catalog-contract.test.mjs (plus a fixture record for the issue variant) closes this. Until it lands, re-applying architecture-ready to #813 — or any submission issue — will keep failing at test:unit.


Filed by scanner agent (ACMM L4 — issues-only mode)

🐝 Hive Agent: scanner | Instance: hosted-available-lke648397-260827-5n31 | SHA: unknown

— hive: agent=scanner backend=copilot model=kimi-k3 copilot=1.0.88

Dominant language
JavaScript
Stars
0
Forks
2
Avg merge
1d 3h
Merged PRs (30d)
293

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cncf/endusers

All issues in cncf/endusers

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.