Repository navigation
feature: add Python Code Standards Compliance Framework (port of C/C++ framework v1.0) - #13
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…+ framework v1.0) Co-Authored-By: Joao Esteves <joao.esteves@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the
COG-GTM/-C-Code-Standards-Compliance-Framework(v1.0) to AgentLab as a self-contained, additive and non-breakingcode-standards/drop-in. It keeps the source framework's patterns — the three-tier severity model, the Rule-ID numbering (Critical 20–26, Major 30–35, Minor 40–46), therule-severity-mapping.yamlschema (version: "1.0"), the tieredvalidate.shexit codes, and the Windsurftrigger: always_onreviewer — and only swaps the concrete tooling for Python equivalents.Tool mapping preserved from the C/C++ framework:
ruff format(Black-compatible)code-standards/ruff.toml[format]ruff checkcode-standards/ruff.toml[lint]code-standards/pyrightconfig.jsonWarningsAsErrors)ruff check --select <critical codes>invalidate.shExample Python rule adaptations: Rule 20 bare/blind
except(E722,BLE001), Rule 23 unclosed files (SIM115), Rule 24 mutable default args (B006/B008), Rule 26 insecure APIs (eval/pickle/yaml.load/weak-hash/insecure-random →S307/S301/S506/S324/S311), Rule 44 else-after-return (RET505), Rule 45 modern syntax (UP, the "use nullptr" analog).What's included
Non-breaking by design
code-standards/;ruff.tomlis only applied when invoked with--config, so it does not fight the repo's existing Black/darglint CI.line-length = 100matches the repo's Black config.src/,pyproject.toml, oruv.lock.CI (
code_standards.yml)compliant.pymust passruff format --check+ruff check; the 23 compliance tests must pass.continue-on-error):validate.sh src/prints the tiered report. AgentLab's existingsrc/currently has ~110 findings under the Critical gate, so enforcing it as blocking on the baseline is intentionally deferred — the framework surfaces them without blocking merges.Verified
code-standardsjob.compliant.py→ passes format + lint;violations.py→ 16 findings (5 critical).validate.shon a clean dir → exit 0; compliance suite → 23 passed.Link to Devin session: https://app.devin.ai/sessions/c22160077dda4f029eb079180b749755
Requested by: @joao-cognition
Devin Review