Repository navigation
Add .claude/settings.local.json to .gitignore - #97
Merged
Merged
Conversation
Member
|
Nice... Should we also ... describe it somewhere :) ? |
potiuk
approved these changes
May 8, 2026
onlyarnav
added a commit
to onlyarnav/magpie
that referenced
this pull request
Sep 27, 2026
…CodeQL alert - Remove unused type: ignore comments from checker imports in privacy.py - Add mypy override module checker.* with ignore_missing_imports in tools/typed-decision/pyproject.toml so workspace-mypy passes cleanly under prek. - Remove redundant empty try/except block in JevProvider.score() response parsing, resolving CodeQL alert apache#97. Refs apache#1370 Refs apache#1402 Generated-by: Antigravity
potiuk
pushed a commit
to onlyarnav/magpie
that referenced
this pull request
Oct 4, 2026
…CodeQL alert - Remove unused type: ignore comments from checker imports in privacy.py - Add mypy override module checker.* with ignore_missing_imports in tools/typed-decision/pyproject.toml so workspace-mypy passes cleanly under prek. - Remove redundant empty try/except block in JevProvider.score() response parsing, resolving CodeQL alert apache#97. Refs apache#1370 Refs apache#1402 Generated-by: Antigravity
potiuk
added a commit
that referenced
this pull request
Oct 4, 2026
…ackend (#1402) * feat(tools): provider-agnostic typed decision contract with Jev API backend Add the provider-agnostic typed decision tool contract (contract:typed-decision) under tools/typed-decision/ supporting Choice, Score, and Noul decision operations, with TypeSafe's Jev API (systemone) as the initial backend. Key features and invariants: - Contract operations: * choice(prompt, options: list[str]) -> {label, confidence} * score(prompt, scale) -> {value, confidence} * noul(prompt) -> {probability} - Fail-open contract: On missing configuration, timeout, network error, or provider error, raise TypedDecisionUnavailable — never hallucinate or fabricate an answer. - Zero external HTTP dependencies: Standard library only (urllib.request). - Pinned model version: Pinned to constant JEV_MODEL = "systemone-2026-06-01", never "latest". - Privacy-LLM gate: All outbound prompts are routed through the tools/privacy-llm/ gate check and redaction pipeline before leaving the process. - Credential resolution: TYPESAFE_API_KEY (or fallback JEV_API_KEY) and ~/.config/apache-magpie/typesafe.key. - Network resilience: Exactly one retry with backoff on timeout before fail-open. - Workspace integration: Added to pyproject.toml workspace members, Axis 2 capabilities in docs/labels-and-capabilities.md, validator TOOL_CAPABILITIES, and CONTRACT_POLICY in tools/vendor-neutrality-score. - Pytest suite covering all operations, timeout retries, error conditions, privacy gate routing, and registration. Fixes #1370 Generated-by: Antigravity * fix(typed-decision): address CodeQL alerts on ellipsis and empty except - In interface.py, remove redundant `...` (ellipsis) expression statements following docstrings in abstract method definitions, resolving CodeQL "Statement has no effect" (py/useless-expression) alerts. - In providers/jev.py, add an explanatory comment inside the `except OSError:` clause when scanning candidate key paths, resolving the CodeQL "Empty except" (py/empty-except) alert. Refs #1370 Generated-by: Antigravity * fix(typed-decision): address maintainer review feedback on privacy gate and validation - Privacy gate: Enforce deny-by-default for third-party endpoints when no privacy-llm.md config is found. Integrate tools/privacy-llm/checker canonical parser (parse_config, _approve_by_default_rules, _approve_by_opt_in) with strict opt-in verification (non-empty Data-residency contract, non-placeholder Approved-by sign-offs). - Responsibility split: Clarify in tool.md and README.md that callers (skills) are responsible for redacting PII before calling typed-decision, while the privacy gate enforces network egress boundary. - Jev provider strict validation: Raise TypedDecisionUnavailable on missing or non-numeric confidence (never default to 1.0), validate confidence and probability in [0.0, 1.0], validate label in options, and validate score scale bounds upfront. Wrap all response JSON extraction in try/except to prevent KeyError/TypeError leaks. - Cleanup: Remove dead leftover file tools/typed-decision/providers/jev.py. - Registry deduplication: Simplify _is_jev_configured() to delegate directly to _resolve_api_key() is not None. - Documentation: Apply Semantic Line Breaks (SemBr) and remove duplicate SPDX headers in README.md and tool.md. Add tools/typed-decision to docs/adapters/registry.md and docs/vendor-neutrality.md (Table 1, Table 2, and extension points). - Test suite: Add comprehensive unit tests covering deny-by-default behavior, opt-in requirements, scale pre-validation, and response validation. Refs #1370 Refs #1402 Generated-by: Antigravity * fix(typed-decision): address workspace-mypy in prek and empty except CodeQL alert - Remove unused type: ignore comments from checker imports in privacy.py - Add mypy override module checker.* with ignore_missing_imports in tools/typed-decision/pyproject.toml so workspace-mypy passes cleanly under prek. - Remove redundant empty try/except block in JevProvider.score() response parsing, resolving CodeQL alert #97. Refs #1370 Refs #1402 Generated-by: Antigravity * fix(typed-decision): address maintainer review on privacy binding, dependency wiring, and scale validation - Privacy gate: Bind opt-in checks to URL/host and only apply provider name label when endpoint equals DEFAULT_ENDPOINT, preventing name-only opt-ins from approving arbitrary destination hosts - Checker dependency: Declare checker as a workspace dependency in tools/typed-decision/pyproject.toml and root pyproject.toml, add public check_endpoint() helper in checker.check and py.typed marker in checker package, and drop sys.path hack and mypy override - Gate hook: Remove production custom gate hook and ensure deny-by-default cannot be bypassed in-process - Scale validation: Pre-validate scalar and tuple scale arguments in JevProvider.score(), normalize scalars to (0, n), and bounds-check returned scores across all scale formats - Logging: Drop full response repr ({resp!r}) from error messages to avoid echoing prompt content into logs - Documentation & registries: Cite dedicated issue #1431 for the local-model typed-decision backend in docs/adapters/registry.md and docs/vendor-neutrality.md Table 2, and fix reference adapter column formatting - Tests: Add unit tests for name-only opt-in host binding, scalar scale normalization and bounds checking, and clean up strict gate environment variables Refs #1370 Refs #1402 Refs #1431 Generated-by: Antigravity * style: update vendor-neutrality score to 10/13 (77%) and trim trailing newlines Generated-by: Antigravity * style(docs): fix markdownlint MD012 multiple blanks in vendor-neutrality.md Generated-by: Antigravity * fix(typed-decision): enforce host-bound privacy check, reject userinfo/fragments, and validate finite scales Address maintainer review feedback on PR #1402: - Host-bind endpoint privacy check in tools/privacy-llm/checker: - Reject URLs containing userinfo (@) or fragments (#) - Drop Claude Code free-text matching for URL endpoint checks - Require exact host matching for opt-in URLs: host_of(endpoint) == host_of(opt_url) - Restrict name-only opt-ins strictly to default_endpoint matching - Update tools/typed-decision/src/typed_decision/privacy.py: - Pass default_endpoint=DEFAULT_ENDPOINT to check_endpoint - Clarify host-bound validation in docstring - Deduplicate DEFAULT_ENDPOINT: import from privacy.py into providers/jev.py - Add math.isfinite checks on scalar and interval scale bounds and returned score values - Add license field and clean up blank lines in pyproject.toml - Make no-config tests hermetic using monkeypatch.chdir(tmp_path) - Add comprehensive test coverage for security attack URLs and non-finite scales Generated-by: Antigravity * fix(privacy-llm,typed-decision): fix host extraction bypasses, response type-confusion, and test encoding - checker/check.py: validate candidate hostnames with _is_valid_hostname to reject decimal/version tokens (e.g. 3.5 Sonnet) and require non-empty raw_desc for name-only opt-in matching - typed_decision/privacy.py: always include provider name in raw_desc - typed_decision/providers/jev.py: enforce strict non-boolean checks on response fields and require dict envelopes for 'result' and 'decision' - checker/tests: specify encoding='utf-8' in _write helper to prevent Windows cp1252 decode errors - Add regression tests covering all bypasses and error envelope cases * test(privacy-llm,typed-decision): align regression test cases with review specifications * fixup: tighten name-only opt-in matching and close review follow-ups - check.py: match name-only opt-ins on whole words against the provider description with URLs stripped, so a short opt-in name such as "AI (internal)" can no longer match inside https://api.typesafe.ai/... and approve a provider nobody opted in to. - check.py: stop splitting bare opt-in hosts on '-', so bedrock-runtime.eu-central-1.amazonaws.com is extracted whole. - Tests for both, plus HOME/cwd isolation in the typed-decision autouse fixture and a test for the ~/.config/apache-magpie/typesafe.key path. - Restore the checker package docstring above the new re-exports. - README: how the provider behaves and is enabled under the secure agent setup. Generated-by: Claude Opus 5 --------- Co-authored-by: Jarek Potiuk <[email protected]>
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.
Some of our skills stay loaded even while developing this project itself, which can unnecessarily increase context usage during development.
To make local development lighter, this PR adds
settings.local.jsonto.gitignoreso contributors can locally disable loading most skills while working on the repository.If you are experiencing the same issue, you can add the following configuration to
settings.local.json:{ "$schema": "https://json.schemastore.org/claude-code-settings.json", "skillOverrides": { "pr-management-code-review": "off", "pr-management-mentor": "off", "pr-management-stats": "off", "pr-management-triage": "off", "security-cve-allocate": "off", "security-issue-deduplicate": "off", "security-issue-fix": "off", "security-issue-import": "off", "security-issue-import-from-md": "off", "security-issue-import-from-pr": "off", "security-issue-invalidate": "off", "security-issue-sync": "off", "setup-isolated-setup-install": "off", "setup-isolated-setup-update": "off", "setup-isolated-setup-verify": "off", "setup-override-upstream": "off", "setup-shared-config-sync": "off", "setup-steward": "off", "write-skill": "on" } }Before
After