Skip to content

CLI-Reference overlay: CI publish wiring + close V-cliref-link-drift / V-cliref-db-integrity gaps (#127)#128

Merged
mobileskyfi merged 5 commits into
mainfrom
feat/cliref-ci-gates-127
Jul 21, 2026
Merged

CLI-Reference overlay: CI publish wiring + close V-cliref-link-drift / V-cliref-db-integrity gaps (#127)#128
mobileskyfi merged 5 commits into
mainfrom
feat/cliref-ci-gates-127

Conversation

@mobileskyfi

@mobileskyfi mobileskyfi commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Follow-on to #124/#126. Wires the CLI-Reference overlay into published builds and closes the two GAP validation rows deferred from #124. Verified against a full local build (59 restraml versions + live cli-reference fetch): 228 pages / 1,051 entries / 10,118 fields / 948 flags; crosswalk 907 exact / 24 alias / 120 manual-only.

1. CI publish wiring

  • release.yml build job: adds Extract CLI-Reference overlay (extract-cliref) and Link CLI-Reference to inspect (link-cliref) — the link step runs after "Extract command tree" populates schema_nodes (it fails fast on an empty tree by design). Published DBs now carry cliref_* + the crosswalk, so the cli-reference/* export datasets are populated.
  • qa.yml db-content floors extended to require populated cliref_entries / cliref_fields / cliref_entry_schema_links.

2. V-cliref-link-drift (GAP → blocking)

  • link-cliref --check re-links the built DB and byte-compares the exact/alias/manual-only crosswalk against a committed, reviewable cli-reference-links.tsv (a # counts header + the 24 alias + 120 manual-only rows), and asserts every alias match_detail names a KNOWN_ALIAS_SEGMENTS member.
  • Regenerate after a legitimate corpus refresh with make link-cliref-baseline.
  • Runs in qa.yml db-content (db_source=artifact, the release path).

3. V-cliref-db-integrity (GAP → blocking)

  • New src/check-cliref-db.ts (make cliref-db-check): integrity_check / foreign_key_check clean, no orphan cliref_* rows, enum/CHECK valid, occurrence-order uniqueness, and the field view exposes only settable Argumentarg mappings (every Read-only Argument has zero view rows). Size-independent (counts stay in the floors). Runs in qa.yml db-content.

Bonus: a real parser bug the #124 fail-loud surfaced

Building the overlay against the live corpus tripped #126's requireAttr on interface/pppoe-server: <ArgTableRow> attributes were truncated at a > inside a quoted value (typ="iface_enum { <l2tp>:0xfffffffe }"), so typ lost its closing quote and read as missing — previously stored as an empty raw_type with a garbled description. The tag matcher now skips whole quoted attribute values. Anchored by a new test; corpus counts are unchanged (values corrected, not rows).

Validation

  • Full bun test green (1,043 pass). Biome, tsc, markdownlint clean.
  • link-cliref --check: passes on match, exits 1 on drift (both verified locally).
  • check-cliref-db.ts: clean against the full 1,051-entry build.
  • VALIDATION.md rows flipped; release.test.ts anchors the new steps + floors.

Note: the PR's test.yml runs bun test only — the two new gates need a built DB, so they run on qa.yml dispatch / release. I'm dispatching a qa.yml (local-build, full_versions) run on this branch to exercise them end-to-end in CI.

Closes #127.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Released database artifacts now include the CLI-Reference overlay and linked entries.
    • Added automated crosswalk drift and database integrity validation during release checks.
    • Added tools to generate and verify CLI-Reference link baselines.
  • Bug Fixes

    • Fixed parsing of CLI-Reference argument types containing > characters.
  • Documentation

    • Updated CLI-Reference pipeline and release-validation documentation.

Wire the overlay into published builds and close the two GAP validation rows
(V-cliref-link-drift, V-cliref-db-integrity) from #124.

- release.yml: run extract-cliref + link-cliref (link after "Extract command
  tree" populates schema_nodes), so published DBs carry cliref_* + the crosswalk.
- V-cliref-link-drift: `link-cliref --check` re-links the built DB and
  byte-compares the exact/alias/manual-only crosswalk against a committed,
  reviewable cli-reference-links.tsv (24 alias + 120 manual-only rows, counts
  header), and asserts every alias names a KNOWN_ALIAS_SEGMENTS member.
  `--write-baseline` / `make link-cliref-baseline` regenerates it.
- V-cliref-db-integrity: new src/check-cliref-db.ts — integrity/FK/orphans/
  enums/occurrence-order uniqueness + the settable-only field-view invariant.
- qa.yml db-content: run both gates against the built DB (local-build/artifact),
  and extend the content floors with cliref_entries/fields/links.
- VALIDATION.md: flip both rows GAP -> blocking; V-cliref-parse-reconcile is now
  release-wired. release.test.ts anchors the new steps/floors.

Also fix a real parser bug the #124 fail-loud surfaced against the live corpus:
<ArgTableRow> attributes were truncated at a '>' inside a quoted value (e.g.
typ="iface_enum { <l2tp>:0xfffffffe }" on interface/pppoe-server), storing an
empty raw_type. The tag matcher now skips whole quoted values.

Verified against a full local build (59 restraml versions + live cliref):
228 pages / 1051 entries / 10118 fields / 948 flags; 907 exact / 24 alias /
120 manual-only; --check passes and exits 1 on drift; integrity gate clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 21, 2026 19:43
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 904dbe0d-b8a3-4d6f-bec6-503c3da06273

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Release builds now populate the CLI-reference overlay and inspection crosswalk. New baseline and database-integrity checks run through QA gates, with workflow tests, parser regression coverage, documentation, and validation-matrix updates.

Changes

CLI-Reference overlay hardening

Layer / File(s) Summary
Overlay extraction and parsing
src/extract-cliref.ts, src/extract-cliref.test.ts, .github/workflows/release.yml, src/release.test.ts
Release builds extract and link the CLI-reference overlay after command-tree generation; quoted ArgTableRow attributes containing > are parsed correctly and tested.
Crosswalk baseline and drift checks
src/link-cliref.ts, src/link-cliref.test.ts, Makefile
Adds deterministic crosswalk baselines, alias-segment audits, --write-baseline, --check, and corresponding Make targets with coverage for exact, alias, and manual-only mappings.
Full-overlay database integrity validation
src/check-cliref-db.ts
Validates population, SQLite integrity, foreign keys, orphan rows, domain constraints, occurrence uniqueness, and field-view semantics.
CI gates and validation documentation
.github/workflows/qa.yml, src/release.test.ts, VALIDATION.md, MANUAL.md, CHANGELOG.md
Adds overlay row floors, link-drift and integrity gates, and documents the release pipeline and baseline regeneration process.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • tikoci/rosetta#43: Introduces the QA workflow and db-content gate structure extended here.
  • tikoci/rosetta#126: Provides the CLI-reference linking path extended with baseline and integrity checks.

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Most #127 requirements are implemented, but the committed baseline TSV at cli-reference-links.tsv is excluded, so the drift check baseline cannot be verified. Include cli-reference-links.tsv in review or confirm it was updated to the new baseline so the link-drift gate can be verified.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and matches the main CI wiring and validation-gap closure work.
Out of Scope Changes check ✅ Passed No unrelated code changes stand out; the parser fix, tests, workflows, and docs all support the overlay and validation work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cliref-ci-gates-127

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

link-cliref fails fast on an empty schema_nodes, but the command tree is only
populated on the full-versions path — a single-version build (make extract /
non-dispatch release trigger) runs extract-commands, not extract-all-versions.
Guard so the link + drift gate run iff a crosswalk can form:

- release.yml: link-cliref runs only when schema_nodes has dir/cmd nodes.
- qa.yml: the CLIREF_LINKS floor and link-cliref-check skip when the tree is
  absent (e.g. the default local-build rehearsal). cliref-db-check still runs —
  it's valid with an empty crosswalk (the field view yields zero rows).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Wires the existing CLI-Reference overlay pipeline into CI-published DB builds and promotes the previously deferred CLI-Reference validation gaps into blocking, reproducible QA gates (plus fixes a live-corpus parser edge case).

Changes:

  • Adds extract-cliref + link-cliref to the release build pipeline and extends qa.yml DB-content floors to require populated cliref_* tables.
  • Introduces a committed crosswalk baseline (cli-reference-links.tsv) and link-cliref --check drift gate (V-cliref-link-drift) enforced in qa.yml.
  • Adds src/check-cliref-db.ts structural/semantic full-DB integrity gate (V-cliref-db-integrity) and fixes <ArgTableRow> attribute parsing when a quoted value contains a literal >.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
VALIDATION.md Flips V-cliref-link-drift / V-cliref-db-integrity from GAP to blocking and updates V-cliref-parse-reconcile to reflect CI wiring.
src/release.test.ts Asserts release.yml and qa.yml include the new CLI-Reference wiring, floors, and gates (order + presence checks).
src/link-cliref.ts Adds baseline TSV generation + --check mode for drift detection and alias allowlist auditing.
src/link-cliref.test.ts Adds unit coverage for baseline generation and alias-segment auditing (using the db.ts singleton).
src/extract-cliref.ts Fixes <ArgTableRow> parsing to avoid truncating attributes when > appears inside quoted attribute values.
src/extract-cliref.test.ts Adds regression test for the >-inside-quoted-attribute parser bug.
src/check-cliref-db.ts New full-DB CLI-Reference integrity gate script (PRAGMA checks, orphans, enums, uniqueness, view semantics).
MANUAL.md Documents that release builds now include the overlay and that qa.yml runs the two new blocking CLI-Reference gates.
Makefile Adds targets for baseline regeneration/check and the full-DB integrity gate (link-cliref-baseline, link-cliref-check, cliref-db-check).
cli-reference-links.tsv New committed baseline crosswalk (alias + manual-only rows + pinned counts header).
CHANGELOG.md Records user-visible release/QA behavior change (overlay now shipped + CI gates) and the parser fix.
.github/workflows/release.yml Adds Extract CLI-Reference overlay and Link CLI-Reference to inspect steps in the build job.
.github/workflows/qa.yml Extends DB-content floors for cliref_* presence and adds V-cliref-link-drift / V-cliref-db-integrity steps.

Comment thread src/link-cliref.test.ts
- release.yml comment "iff" → "only when" (cspell dictionary).
- link-cliref.test.ts header no longer claims the file never touches the db.ts
  singleton — the baseline tests seed it (and clean up in afterAll).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/qa.yml:
- Around line 236-239: Add a cliref_flags row count alongside CLIREF_ENTRIES,
CLIREF_FIELDS, and CLIREF_LINKS, define and document an appropriate minimum
floor, and enforce that floor in the QA content gate. Include the cliref_flags
count in the database summary output while preserving the existing checks and
failure behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9f91729c-fbb7-4cf1-b7a3-e62c6f6180d0

📥 Commits

Reviewing files that changed from the base of the PR and between 363a87a and 036e889.

⛔ Files ignored due to path filters (1)
  • cli-reference-links.tsv is excluded by !**/*.tsv, !*.tsv
📒 Files selected for processing (12)
  • .github/workflows/qa.yml
  • .github/workflows/release.yml
  • CHANGELOG.md
  • MANUAL.md
  • Makefile
  • VALIDATION.md
  • src/check-cliref-db.ts
  • src/extract-cliref.test.ts
  • src/extract-cliref.ts
  • src/link-cliref.test.ts
  • src/link-cliref.ts
  • src/release.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: copilot-pull-request-reviewer
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Bun and TypeScript, including Bun-native runtime APIs such as bun:sqlite, Bun.serve, and bunx.

Rosetta uses Bun and TypeScript; prefer bun, bun test, and make verify where applicable, rather than Node/npm-oriented substitutes.

Files:

  • src/extract-cliref.test.ts
  • src/extract-cliref.ts
  • src/check-cliref-db.ts
  • src/release.test.ts
  • src/link-cliref.test.ts
  • src/link-cliref.ts
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Rosetta is read-only documentation/schema context and must not connect to or modify a user's router.

Files:

  • src/extract-cliref.test.ts
  • src/extract-cliref.ts
  • src/check-cliref-db.ts
  • src/release.test.ts
  • src/link-cliref.test.ts
  • src/link-cliref.ts
**/*.{ts,tsx,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep the attribution boundary visible when community RouterOS skills surface, because they are supplemental rather than official MikroTik documentation.

Files:

  • src/extract-cliref.test.ts
  • src/extract-cliref.ts
  • MANUAL.md
  • CHANGELOG.md
  • VALIDATION.md
  • src/check-cliref-db.ts
  • src/release.test.ts
  • src/link-cliref.test.ts
  • src/link-cliref.ts
*

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Keep this Copilot instructions file short; put substantive rules in narrow instruction files under .github/instructions/*.instructions.md.

Files:

  • MANUAL.md
  • CHANGELOG.md
  • VALIDATION.md
  • Makefile
**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.md: Keep each project documentation file limited to its canonical role; prefer the documented canonical home instead of creating a new top-level Markdown file.
Do not duplicate content from this routing index; move operational detail, schema blocks, or long rule lists to their canonical documentation or instruction files.
Apply the repository's Markdown linting and fenced-code conventions, while excluding LLM instruction files where the repository explicitly requires that exclusion.

Files:

  • MANUAL.md
  • CHANGELOG.md
  • VALIDATION.md
MANUAL.md

📄 CodeRabbit inference engine (CLAUDE.md)

Store installation, operations, release or re-extraction procedures, and schema reference material in MANUAL.md.

Files:

  • MANUAL.md
{README.md,MANUAL.md,src/setup.ts}

📄 CodeRabbit inference engine (AGENTS.md)

Keep public client setup snippets aligned across README.md, src/setup.ts, and MANUAL.md, including codex mcp add rosetta -- bunx @tikoci/rosetta``.

Files:

  • MANUAL.md
CHANGELOG.md

📄 CodeRabbit inference engine (CLAUDE.md)

Record user-visible shipped changes in CHANGELOG.md under [Unreleased] or release sections.

Files:

  • CHANGELOG.md
VALIDATION.md

📄 CodeRabbit inference engine (CLAUDE.md)

Document load-bearing invariants and how CI proves them in VALIDATION.md.

Files:

  • VALIDATION.md
🧠 Learnings (8)
📚 Learning: 2026-07-12T20:33:29.883Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/qa.yml:101-101
Timestamp: 2026-07-12T20:33:29.883Z
Learning: In tikoci/rosetta, GitHub Actions workflow steps that reference official actions (e.g., `actions/checkout`, `actions/download-artifact`) may intentionally use version tags (e.g., `v4`, `v3`) instead of full commit SHAs. During code review, do not flag these unpinned `actions/*` tag references as a GitHub Actions security issue for this repository, because Dependabot’s `github_actions` updates tagged refs and GitHub surfaces action security advisories against tagged refs.

Applied to files:

  • .github/workflows/release.yml
  • .github/workflows/qa.yml
📚 Learning: 2026-07-12T20:33:35.489Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/codeql.yml:29-29
Timestamp: 2026-07-12T20:33:35.489Z
Learning: In this repo’s GitHub Actions workflows, preserve the maintainer’s security/maintenance intent: action references under `actions/*` may use version tags (e.g., `actions/checkoutv7`) instead of full commit SHAs, and `actions/checkout` may intentionally keep `persist-credentials: true`. During review, do not raise issues suggesting SHA pinning for `actions/*` or proposing `persist-credentials: false` unless the project adopts an org-wide policy that enforces SHA pinning.

Applied to files:

  • .github/workflows/release.yml
  • .github/workflows/qa.yml
📚 Learning: 2026-07-12T20:33:29.883Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/qa.yml:101-101
Timestamp: 2026-07-12T20:33:29.883Z
Learning: In this repository’s GitHub Actions workflows (under .github/workflows), do NOT flag actions/checkout steps for missing `persist-credentials: false` when the workflow is intentionally relying on the persisted GitHub token for later authenticated steps in the same job (e.g., release or subsequent steps that require auth). This exception applies to workflows where the checked-out workspace is not being uploaded as an artifact and the token persistence is an intentional part of the job’s authentication flow.

Applied to files:

  • .github/workflows/release.yml
  • .github/workflows/qa.yml
📚 Learning: 2026-07-12T20:33:31.549Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/release.yml:433-433
Timestamp: 2026-07-12T20:33:31.549Z
Learning: In this repo, GitHub Actions used in workflow files should be pinned to version tags (e.g., actions/checkoutvX, not full commit SHAs). During code review, do not flag or fail checks that look like “unpinned-uses”/“SHA pinning required” (e.g., zizmor unpinned-uses) for actions/checkout, actions/download-artifact, or other third-party actions referenced from `.github/workflows`—keep the existing tag-pinning policy so Dependabot’s `github_actions` tracking and GitHub’s action security advisory visibility against tagged refs are preserved.

Applied to files:

  • .github/workflows/release.yml
  • .github/workflows/qa.yml
📚 Learning: 2026-07-12T20:33:42.621Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/test.yml:19-19
Timestamp: 2026-07-12T20:33:42.621Z
Learning: In tikoci/rosetta workflows, follow the maintainer policy: do not require GitHub Actions step refs under `actions/*` (e.g., `actions/checkout`) to be pinned to full commit SHAs, and do not require `persist-credentials: false` to be set on `actions/checkout` (or other `actions/*`) by default. Only flag missing SHA pinning or missing `persist-credentials: false` if the maintainer explicitly indicates the policy has changed (for example, adopting an org-wide SHA-pinning enforcement).

Applied to files:

  • .github/workflows/release.yml
  • .github/workflows/qa.yml
📚 Learning: 2026-07-12T20:33:36.397Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/release.yml:74-74
Timestamp: 2026-07-12T20:33:36.397Z
Learning: For this repo (tikoci/rosetta), workflow files in .github/workflows should keep GitHub Actions `actions/*` pinned to version tags (e.g., `v3`, `v4`) rather than full commit SHAs. Do not raise/retain findings that would otherwise complain about unpinned uses (e.g., zizmor `unpinned-uses`) or SHA pinning, unless the maintainer later enables an org-wide enforcement policy requiring SHA pinning.

Applied to files:

  • .github/workflows/release.yml
  • .github/workflows/qa.yml
📚 Learning: 2026-07-12T20:33:31.549Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/release.yml:433-433
Timestamp: 2026-07-12T20:33:31.549Z
Learning: In tikoci/rosetta release-related GitHub Actions workflows, do not treat the default `actions/checkout` behavior for `persist-credentials` (i.e., not explicitly setting `persist-credentials: false`) as a security issue when the checked-out workspace is not uploaded as an artifact. The jobs rely on the persisted token for later authenticated steps within the same job. Only raise/require changing `persist-credentials` if the workflow uploads the checked-out workspace (or otherwise packages the token-bearing credential context) as an artifact, making the persisted credentials usable outside the job.

Applied to files:

  • .github/workflows/release.yml
📚 Learning: 2026-07-12T20:33:36.397Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/release.yml:74-74
Timestamp: 2026-07-12T20:33:36.397Z
Learning: In this repo’s release-related GitHub Actions workflows, do not flag `actions/checkout` steps for missing `persist-credentials: false`. The maintainer intentionally relies on the default `persist-credentials: true` because the job does not upload the checked-out workspace as an artifact and later authenticated steps in the same job require the persisted token. Only require changing `persist-credentials` if the job structure does not rely on the persisted credentials for subsequent steps.

Applied to files:

  • .github/workflows/release.yml
🔇 Additional comments (18)
src/extract-cliref.ts (1)

263-267: LGTM!

src/extract-cliref.test.ts (1)

151-163: LGTM!

.github/workflows/release.yml (1)

337-345: LGTM!

src/release.test.ts (2)

704-716: LGTM!


1070-1089: LGTM!

src/link-cliref.ts (3)

20-35: LGTM!


182-251: LGTM!


269-292: LGTM!

src/link-cliref.test.ts (2)

2-11: LGTM!


126-178: LGTM!

Makefile (2)

7-7: LGTM!


176-190: LGTM!

src/check-cliref-db.ts (2)

14-15: 🎯 Functional Correctness

Reject or explicitly rule out NULL values in these checks.

NOT IN, NOT BETWEEN, and <> evaluate to UNKNOWN for NULL, so nullable enum fields or view rows can bypass this gate. Add explicit IS NULL violations, or verify the schema’s NOT NULL constraints and add a regression test.

Also applies to: 55-63, 75-82


1-13: LGTM!

Also applies to: 16-54, 65-74, 84-90

.github/workflows/qa.yml (1)

304-317: LGTM!

VALIDATION.md (1)

56-60: LGTM!

MANUAL.md (1)

102-102: LGTM!

CHANGELOG.md (1)

29-33: LGTM!

Comment thread .github/workflows/qa.yml Outdated
The db-content gate floored entries/fields/links but not cliref_flags, so a
regression dropping all print-output flags could pass. Add a CLIREF_FLAGS count,
summary line, and ≥800 floor (observed ~948); anchor it in release.test.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mobileskyfi
mobileskyfi requested a review from Copilot July 21, 2026 19:59
@mobileskyfi
mobileskyfi removed the request for review from Copilot July 21, 2026 20:01
@mobileskyfi

Copy link
Copy Markdown
Contributor Author

CoPilot got removed as reviewer by Claude. However, that does not stop a review, only its output in issue. This is a waste since if CoPilot triggers, it worth checking the results. Repo has CoPilot, again, configured for only initial push for automatic review. I did a manual request for CoPilot after df39ec3 git as a final double-check. Claude should not remove CoPilot as a reviewer, if fix the repo defaults. But Claude should not that if I manually request a review on an incremental push that is occasionally to be expected.

So review https://github.com/tikoci/rosetta/tasks/bba4172f-62c4-4a37-94fc-cb7e4fedca7d?session_id=59aec810-fe49-4b12-beec-f1690fa93a26 did have one comment, that essentially went nowhere since the reviewer was just removed - that does not cancel a started review agent in GitHub.

{
  "comment_content": "`readCrosswalk()` orders only by `source_path`/`source_type`, but `cliref_entries` identity is `(page_id, source_order)` (see `src/db.ts:563-580`) and the design explicitly allows duplicate heading paths (`DESIGN.md:209`). With duplicates, the relative order among ties is undefined, so `buildBaselineTsv()` can produce non-deterministic TSV output and trip `--check` via harmless reorderings. Add a stable tie-breaker (e.g. `page_id, source_order`) to make the baseline generation deterministic.",
  "comment_type": "bug",
  "file_location": "src/link-cliref.ts",
  "start_line": 199,
  "end_line": 199,
  "fixed": false,
  "suggested_fix": "       ORDER BY e.source_path, e.source_type, e.page_id, e.source_order`,"
}

Stored bug comment [ID: 001] for line 199 in src/link-cliref.ts Inline fix stored for comment [ID: 001] at lines 199-199

192.     .query(
193.       `SELECT e.source_path                          AS source_path,
194.               e.source_type                          AS source_type,
195.               COALESCE(l.match_kind, 'manual-only')  AS match_kind,
196.               COALESCE(l.match_detail, '')           AS match_detail
197.        FROM cliref_entries e
198.        LEFT JOIN cliref_entry_schema_links l ON l.entry_id = e.id
199.        ORDER BY e.source_path, e.source_type`,
200.     )
201.     .all() as CrosswalkRow[];

readCrosswalk() ordered only by (source_path, source_type), but the corpus
allows duplicate heading paths, so tied rows had undefined order — the baseline
TSV could reorder harmlessly and trip link-cliref --check. Add (page_id,
source_order), the entry identity, as a full tie-breaker. The current corpus has
no such ties (committed baseline unchanged) but generation is now order-stable.

Credit: Copilot review of df39ec3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mobileskyfi

Copy link
Copy Markdown
Contributor Author

Addressing the Copilot review of df39ec3 (whose output I inadvertently suppressed by removing the reviewer — my mistake; I won't do that again):

Valid finding — fixed in d33274c. readCrosswalk() ordered only by (source_path, source_type), but the corpus allows duplicate heading paths, so tied rows had undefined order and the baseline TSV could reorder harmlessly and trip link-cliref --check. Added (page_id, source_order) — the entry identity — as a full tie-breaker. The current corpus happens to have no such ties among the alias/manual-only rows, so the committed cli-reference-links.tsv is byte-unchanged, but generation is now order-stable and future-proof. --check still passes.

@mobileskyfi
mobileskyfi merged commit 34f1d32 into main Jul 21, 2026
8 checks passed
@mobileskyfi
mobileskyfi deleted the feat/cliref-ci-gates-127 branch July 21, 2026 20:20
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.

CLI-Reference overlay: CI publish wiring + close V-cliref-link-drift / V-cliref-db-integrity gaps

2 participants