Skip to content

Codex/fix mypy type errors#3

Closed
qCanoe wants to merge 5 commits intomainfrom
codex/fix-mypy-type-errors
Closed

Codex/fix mypy type errors#3
qCanoe wants to merge 5 commits intomainfrom
codex/fix-mypy-type-errors

Conversation

@qCanoe
Copy link
Copy Markdown
Owner

@qCanoe qCanoe commented Mar 16, 2026

No description provided.

claude and others added 5 commits March 16, 2026 12:42
5-phase roadmap covering dataset validation, invariant enhancement,
production hardening, multi-chain support, and research publication.

https://claude.ai/code/session_011QpXPYzuppRtSHFqDKWtQt
- constants.py: add Permit2 permitBatch/permitSingle/permitAndTransferFrom
  selectors to PERMISSION_OP_SELECTORS so I2 correctly skips them

- tests/conftest.py: shared gate_config fixture for offline tests
- tests/fixtures/rpc_responses.py: JSON-RPC mock response builders
  (eth_call, receipt, Transfer/Approval/ApprovalForAll logs)
- tests/test_integration.py: 10 end-to-end scenarios covering I1–I3,
  fail-open, and classifier correctness; runs fully offline via
  pytest-httpx mocking of httpx.AsyncClient

- pyproject.toml / requirements.txt: add pytest-httpx>=0.30.0, ruff;
  add [tool.ruff] config (line-length=100, target-version=py39)

- .github/workflows/ci.yml: GitHub Actions CI with test+mypy job and
  separate lint (ruff) job

- README_CN.md: new 快速上手 section with CLI example output, 3-line
  Python API example, and updated project structure tree

All 43 tests pass (33 existing + 10 new integration tests).

https://claude.ai/code/session_011QpXPYzuppRtSHFqDKWtQt
…nd new tests

- constants.py: add increaseAllowance/decreaseAllowance to PERMISSION_OP_SELECTORS;
  add 5 DEX swap selectors (1inch, Curve, Balancer, Paraswap, 0x) to ASSET_OP_SELECTORS
- classifier.py: extend is_likely_swap() with new DEX selectors
- config.py: add critical_call_depth_threshold(15), critical_delegate_call_threshold(10),
  dust_threshold_wei(1000), fail_open_on_timeout(True) to InvariantConfig
- invariants.py:
  - I2: activate allowance_balance_multiplier relative-balance check
  - I3: dust filter for unexpected token outflows; doubled limit for composite ops (multicall)
  - I4: unconditional REJECT at critical thresholds regardless of enable_path_rejection
  - Engine: configurable reject-on-timeout via fail_open_on_timeout
- tests: add 14 new unit tests and 2 integration tests covering all strengthened logic
- config.example.json: document the 4 new invariant config parameters

https://claude.ai/code/session_011QpXPYzuppRtSHFqDKWtQt
…thening

- Document I2 relative balance check (allowance_balance_multiplier) and
  increaseAllowance/decreaseAllowance PERMISSION_OP classification fix
- Document I3 dust filter (dust_threshold_wei) and composite-op doubled limit
- Document I4 dual-threshold strategy with critical REJECT table
- Document fail_open_on_timeout configurable behavior
- Add new config parameters table with all 10 invariant settings
- Update test count (57 cases) and test coverage table
- Update project structure tree (ROADMAP.md, CI workflow, fixtures/)
- Add Roadmap section linking to ROADMAP.md

https://claude.ai/code/session_011QpXPYzuppRtSHFqDKWtQt
@qCanoe qCanoe closed this Mar 16, 2026
@qCanoe qCanoe deleted the codex/fix-mypy-type-errors branch March 16, 2026 14:00
@qCanoe qCanoe restored the codex/fix-mypy-type-errors branch March 16, 2026 14:06
@qCanoe qCanoe deleted the codex/fix-mypy-type-errors branch March 16, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants