You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decided (2026-06-05): expose enum.StrEnum for languages/metrics (codegen from the LANG table; Lang.CPP == "cpp"); align analyze_batch to skip_generated=True + expose the 3 kwargs; lock Python dist/import/module names in STABILITY.md before first PyPI publish. See the resolved-decisions comment.
Summary
STABILITY.md and the #505 roadmap describe the Rust library contract and the
CLI artifact formats, but the Python bindings (big-code-analysis-py) and the REST schema (big-code-analysis-web) are absent from the written stability
contract. Both are published surfaces; for a long-term 2.x they need an explicit
contract, especially the Python names, which cannot change after the first PyPI
publish.
Decisions to record (mostly documentation, one default)
Lock the Python distribution/import names (big-code-analysis dist / big_code_analysis import / big_code_analysis._native compiled module — big-code-analysis-py/pyproject.toml). The import name cannot change
post-publish without breaking every consumer. README still says "not yet
published on PyPI" (big-code-analysis-py/README.md) — update before publish.
Document the string-enum decision as intentional.supported_languages()
→ list[str], METRIC_NAMES → tuple[str, ...], AnalysisError.error_kind
→ Literal[...] (big-code-analysis-py/src/lib.rs, _native.pyi). This is
a deliberate, good design (strings round-trip with the CLI JSON language/metric vocabulary; Literal gives static-checker safety without a
runtime enum). Record it as a 2.0 stability decision rather than converting
to enum.Enum.
analyze_batch default polarity (the one breaking item). analyze_batch hardcodes skip_generated=False
(big-code-analysis-py/src/batch.rs:363), the inverse of analyze's True.
Migrating a comprehension from analyze to analyze_batch silently changes
generated-file handling. Decide at 2.0 whether the default should align with analyze. Exposing the three hardcoded kwargs
(exclude_tests/allow_lossy_path/skip_generated) is additive and can land
anytime.
Why 2.0-worthy
The name-locking and contract-documentation must precede the first stable Python
publish; the skip_generated default is breaking. The Python surface is
otherwise 2.0-ready (excellent error mapping, PEP 561 stubs, mypy --strict + pyright gated).
Acceptance
STABILITY.md gains a "Python bindings" section (name lock, string-enum
rationale, error-mapping contract) and a "REST schema" section.
analyze_batch's skip_generated default decided and documented.
Implemented on fix/issue-542 (commit 3220e2a). All three resolved
decisions landed:
StrEnumLang / MetricName (big_code_analysis._enums), generated from the live LANG::name() slugs (fix(web): /metrics language field emits non-lookup display names (c/c++, c#) #540) and Metric::NAMES by big-code-analysis-py/src/codegen.rs with a cargo test drift gate. Lang.CPP == "cpp"; supported_languages() -> list[Lang], METRIC_NAMES -> tuple[MetricName, ...] (typed in the package
facade; the _native FFI stays plain str). error_kind kept as
a Literal. (Generator lives in the bindings crate, not enums/,
because enums/ cannot see the fix(web): /metrics language field emits non-lookup display names (c/c++, c#) #540 slugs — see the resolution
comment for the rationale.)
analyze_batchskip_generated default flipped False -> True
to align with analyze (breaking); exclude_tests / allow_lossy_path / skip_generated exposed as kwargs (additive).
Summary
STABILITY.mdand the #505 roadmap describe the Rust library contract and theCLI artifact formats, but the Python bindings (
big-code-analysis-py) and theREST schema (
big-code-analysis-web) are absent from the written stabilitycontract. Both are published surfaces; for a long-term 2.x they need an explicit
contract, especially the Python names, which cannot change after the first PyPI
publish.
Decisions to record (mostly documentation, one default)
Lock the Python distribution/import names (
big-code-analysisdist /big_code_analysisimport /big_code_analysis._nativecompiled module —big-code-analysis-py/pyproject.toml). The import name cannot changepost-publish without breaking every consumer. README still says "not yet
published on PyPI" (
big-code-analysis-py/README.md) — update before publish.Document the string-enum decision as intentional.
supported_languages()→
list[str],METRIC_NAMES→tuple[str, ...],AnalysisError.error_kind→
Literal[...](big-code-analysis-py/src/lib.rs,_native.pyi). This isa deliberate, good design (strings round-trip with the CLI JSON
language/metric vocabulary;Literalgives static-checker safety without aruntime enum). Record it as a 2.0 stability decision rather than converting
to
enum.Enum.analyze_batchdefault polarity (the one breaking item).analyze_batchhardcodesskip_generated=False(
big-code-analysis-py/src/batch.rs:363), the inverse ofanalyze'sTrue.Migrating a comprehension from
analyzetoanalyze_batchsilently changesgenerated-file handling. Decide at 2.0 whether the default should align with
analyze. Exposing the three hardcoded kwargs(
exclude_tests/allow_lossy_path/skip_generated) is additive and can landanytime.
Why 2.0-worthy
The name-locking and contract-documentation must precede the first stable Python
publish; the
skip_generateddefault is breaking. The Python surface isotherwise 2.0-ready (excellent error mapping, PEP 561 stubs,
mypy --strict+pyrightgated).Acceptance
rationale, error-mapping contract) and a "REST schema" section.
analyze_batch'sskip_generateddefault decided and documented.Part of the pre-2.0 review (#505).
Resolution
Implemented on
fix/issue-542(commit 3220e2a). All three resolveddecisions landed:
Lang/MetricName(big_code_analysis._enums),generated from the live
LANG::name()slugs (fix(web): /metrics language field emits non-lookup display names (c/c++, c#) #540) andMetric::NAMESbybig-code-analysis-py/src/codegen.rswith acargo testdrift gate.Lang.CPP == "cpp";supported_languages() -> list[Lang],METRIC_NAMES -> tuple[MetricName, ...](typed in the packagefacade; the
_nativeFFI stays plainstr).error_kindkept asa
Literal. (Generator lives in the bindings crate, notenums/,because
enums/cannot see the fix(web): /metrics language field emits non-lookup display names (c/c++, c#) #540 slugs — see the resolutioncomment for the rationale.)
skip_generateddefault flippedFalse -> Trueto align with
analyze(breaking);exclude_tests/allow_lossy_path/skip_generatedexposed as kwargs (additive).contract, error mapping, PEP 561) and REST-schema (fix(web): /metrics language field emits non-lookup display names (c/c++, c#) #540/refactor(web): consistent error schema, response envelope, and introspection endpoints #541
/v1shape) sections, plus 2.0-horizon entries; README + book updated.
All cargo + Python gates (ruff / mypy --strict / pyright / maturin +
pytest) pass. Breaking: default flip + typed returns; additive:
StrEnums, kwargs, docs. Left open for review/merge — not closing.