Skip to content

fix(cli): repair CI break from bundle signing (#1060) - #1599

Merged
Shashankss1205 merged 1 commit into
mainfrom
fix/bundle-export-typer-sentinel
Aug 13, 2026
Merged

Shashankss1205 merged 1 commit into
mainfrom
fix/bundle-export-typer-sentinel

Conversation

@Shashankss1205

Copy link
Copy Markdown
Collaborator

main has been red since #1060 merged (Build Test on f9b6e1be). Two regressions, both in the integration suite, which is why the unit suite stayed green.

1. bundle_export blows up on Typer sentinels — 20 golden tests

tests/integration/test_parser_goldens.py:273 calls bundle_export as a plain function:

bundle_export(output=bundle_path, repo=project_path, no_stats=False, context=None)

Typer only resolves defaults when it invokes the command, so the omitted sign_key keeps its OptionInfo sentinel. That sentinel is truthy, so the new if sign_key: guard passes and sign_key.encode("utf-8") then raises:

AttributeError: 'OptionInfo' object has no attribute 'encode'
  cgc_bundle.py:914 in _create_signature
  cgc_bundle.py:228 in export_to_bundle

Every test_language_golden case failed on this.

This is the bug class test_command_delegation_and_exit_codes already guards, but that meta-test only inspects command→command calls inside main.py — it can't see external callers. Rather than only fixing the one call site, I normalized the two options at the top of bundle_export, since they're the only ones here that get dereferenced rather than merely tested for truthiness. Any programmatic caller gets the same protection.

2. New bundle subcommands missing from the CLI inventory tests

#1060 added bundle verify, bundle inspect and bundle diff without updating test_cli_inventory_grouped_from_source (asserts an exact set) or test_all_canonical_cli_commands_run_with_kuzudb (asserts the smoke matrix covers the inventory).

All three take a required .cgc positional argument, so they can't be invoked bare the way that matrix invokes everything else — excluded with a comment, exactly as bundle merge already is. Their behaviour is covered by the round-trip tests.

Verification

tests/unit/         1178 passed, 7 skipped
tests/integration/    44 passed

My fault for merging #1060 on a green unit run without also running the integration suite — the signing feature itself is fine and round-trips correctly.

Two regressions from #1060, both caught by the integration suite:

1. bundle_export dereferences sign_key/encrypt_password. Called as a plain
   function rather than through Typer -- which tests/integration/test_parser_
   goldens.py:273 does -- an omitted option keeps its OptionInfo sentinel.
   That sentinel is truthy, so `if sign_key:` passed and sign_key.encode()
   raised AttributeError, failing all 20 golden tests. Normalized at the top
   of the command; these two are the only options here that get dereferenced.

2. The new bundle verify/inspect/diff subcommands were not reflected in the
   CLI inventory tests. verify/inspect/diff each require a .cgc positional
   argument, so they are excluded from the bare-invocation smoke matrix the
   same way bundle merge already is.

Full suites green: 1178 unit, 44 integration.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@vercel

vercel Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
code-graph-context-pack Ready Ready Preview Aug 13, 2026 6:33pm

@github-actions

Copy link
Copy Markdown
Contributor

Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Code Graph Analysis

fix(cli): repair CI break from bundle signing (#1060) (#1599)

📊 Interactive Visualization

View the blast radius graph: PR Reviewer Dashboard

📦 Artifacts

The graph JSON has been uploaded as a build artifact: pr-code-graph-1599


Generated by CodeGraphContext using FalkorDB Lite

@Shashankss1205
Shashankss1205 merged commit 16828c7 into main Aug 13, 2026
20 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Aug 13, 2026
Shashankss1205 added a commit that referenced this pull request Aug 13, 2026
.cgc/config.json is generated by running `cgc index` in the repo root. It
was committed accidentally in #1599 because .gitignore did not cover the
directory, so `git add -A` swept it up.

It has no effect on the parity suite (that indexes tests/fixtures/
sample_projects, not the repo root), but it should not be tracked.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 0b616434 Deployed Aug 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant