Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b76382a
feat(inspect): add Code Contract (QC) lint check module
zipsonken Oct 15, 2026
0e0d34c
feat(inspect): integrate QC lint into inspection workflow
zipsonken Oct 15, 2026
2c76057
fix(report): render failed module errors as caution callouts
zipsonken Oct 15, 2026
8610d85
fix(packer): normalize OpenAI-wrapped tools to flat format
zipsonken Oct 15, 2026
2c3f8fb
fix(defect-check): deduplicate defects and collapse tool schema aliases
zipsonken Oct 15, 2026
3d886d2
fix(qc): address Python 3.11 compatibility and remove unused parameter
zipsonken Oct 15, 2026
967758f
refactor(qc): address code review findings
zipsonken Oct 15, 2026
935fd29
docs(qc): document qc_result parameter and tokenize skip rationale
zipsonken Oct 15, 2026
0e15e34
test(qc): add unit tests for rules, checker, renderer and reporter
zipsonken Oct 15, 2026
554fcd4
style(qc): hoist function-level imports to module top
zipsonken Oct 15, 2026
3877c84
fix(qc): use GateResult enum, document regex limits, skip comment dem…
zipsonken Oct 15, 2026
8086c09
test(qc): add bracket and file-encoding edge cases; document type ignore
zipsonken Oct 15, 2026
9b8a648
fix(qc): keep debug trail for skipped files; test schema depth limit
zipsonken Oct 15, 2026
699824c
docs(qc): clarify why QC-0.2 is excluded from the per-snippet checks
zipsonken Oct 15, 2026
8514e4c
fix(qc): accept c++/c# fence languages; broaden file-read error handling
zipsonken Oct 15, 2026
30fd352
refactor(qc): extract shared function-signature helpers; document rel…
zipsonken Oct 15, 2026
d58576c
fix(qc): propagate max_depth through schema recursion; label patterns…
zipsonken Oct 15, 2026
5ab9e7f
test(inspect): cover QC report save when defect check is skipped
zipsonken Oct 15, 2026
7ee808a
fix(qc): add parse-failure logging, immutable rule sets, gate-fail test
zipsonken Oct 15, 2026
aee8bff
fix(qc): use one timestamp per inspection run for all artifacts
zipsonken Oct 15, 2026
1a6012d
fix(qc): parse all heading levels in skill sections; document QC-1.4 …
zipsonken Oct 15, 2026
5ec40b7
fix(qc): microsecond report timestamps; cover --skip-qc-lint; docs
zipsonken Oct 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Code Contract (QC) lint check before LLM analysis: AST-based static inspection
of embedded code blocks and Python source files (syntax, undefined names,
resource leaks, code patterns) with `--skip-qc-lint` to opt out

### Changed

- **Breaking**: tool schema uploads now emit the provider-neutral flat format
`{name, description, parameters}` in both upload paths (push and inspect).
The OpenAI `{type, function}` wrapper is stripped during packing; the
backend converts to the selected provider format when a model endpoint is set.

### Fixed

- Failed module inspections now render a CAUTION callout instead of a
misleading "No defects found" in markdown reports
- Duplicate defects reported under both `$.inputSchema` and `$.parameters`
are deduplicated in terminal and markdown output

## [0.0.8] - 2026-09-21

### Added
Expand Down
35 changes: 35 additions & 0 deletions src/sanityops_cli/code_contract_checker/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2026 zipsonken
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Code Contract inspection module for Logic Artifacts."""

from .models import (
RULE_DEFINITIONS,
GateResult,
QCArtifactResult,
QCDefect,
QCInspectionResult,
QCRuleID,
Severity,
)

__all__ = [
"QCArtifactResult",
"QCDefect",
"QCInspectionResult",
"QCRuleID",
"RULE_DEFINITIONS",
"Severity",
"GateResult",
]
Loading
Loading