Skip to content

Update pytest requirement from <9,>=8 to >=8,<10#5

Merged
pengfei-threemoonslab merged 1 commit into
mainfrom
dependabot/pip/pytest-gte-8-and-lt-10
Apr 25, 2026
Merged

Update pytest requirement from <9,>=8 to >=8,<10#5
pengfei-threemoonslab merged 1 commit into
mainfrom
dependabot/pip/pytest-gte-8-and-lt-10

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 25, 2026

Updates the requirements on pytest to permit the latest version.

Release notes

Sourced from pytest's releases.

9.0.3

pytest 9.0.3 (2026-04-07)

Bug fixes

  • #12444: Fixed pytest.approx which now correctly takes into account ~collections.abc.Mapping keys order to compare them.

  • #13634: Blocking a conftest.py file using the -p no: option is now explicitly disallowed.

    Previously this resulted in an internal assertion failure during plugin loading.

    Pytest now raises a clear UsageError explaining that conftest files are not plugins and cannot be disabled via -p.

  • #13734: Fixed crash when a test raises an exceptiongroup with __tracebackhide__ = True.

  • #14195: Fixed an issue where non-string messages passed to unittest.TestCase.subTest() were not printed.

  • #14343: Fixed use of insecure temporary directory (CVE-2025-71176).

Improved documentation

  • #13388: Clarified documentation for -p vs PYTEST_PLUGINS plugin loading and fixed an incorrect -p example.
  • #13731: Clarified that capture fixtures (e.g. capsys and capfd) take precedence over the -s / --capture=no command-line options in Accessing captured output from a test function <accessing-captured-output>.
  • #14088: Clarified that the default pytest_collection hook sets session.items before it calls pytest_collection_finish, not after.
  • #14255: TOML integer log levels must be quoted: Updating reference documentation.

Contributor-facing changes

  • #12689: The test reports are now published to Codecov from GitHub Actions. The test statistics is visible on the web interface.

    -- by aleguy02

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@8.0.0...9.0.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 9.0.3
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Apr 25, 2026
@pengfei-threemoonslab pengfei-threemoonslab merged commit 8dcd5ba into main Apr 25, 2026
1 check passed
@pengfei-threemoonslab pengfei-threemoonslab deleted the dependabot/pip/pytest-gte-8-and-lt-10 branch April 25, 2026 04:55
pengfei-threemoonslab added a commit that referenced this pull request May 21, 2026
…ding evidence

`ActionSurfaceChange` gained optional `source_path` /
`source_start_line` fields in this PR, but
`evaluate_action_surface_policies` dumps the change into
`Finding.evidence` via `change.model_dump(mode="json")`, which
unconditionally includes those keys as `null`.
`finding_fingerprint` hashes canonicalised `evidence`, so the mere
presence of the new keys shifts every existing action-surface
finding fingerprint relative to pre-v0.19 baselines.

Fix: new private `_change_evidence(change)` helper in
`report/action_surface_diff.py` that dumps with `exclude={"source_path",
"source_start_line"}`. All four `evidence={"change": ...}` call sites
in `evaluate_action_surface_policies` route through the helper.
`ActionSurfaceChange` keeps the structured fields on the diff row
itself (renderers and post-scan consumers still see them); only the
finding-evidence projection drops them.

Verified: the legacy change payload now hashes identically before and
after enrichment — `fp_fe9dd3a3a7e07d00` matches across
pre-fix-legacy, post-fix-bare, and post-fix-enriched dumps. Test
`test_action_policy_finding_evidence_excludes_v019_source_fields`
pins the contract.

Test plan:
- 1677 passed, 4 skipped (full suite).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pengfei-threemoonslab added a commit that referenced this pull request May 21, 2026
…103)

* Add reviewer-grade dual-source provenance and CHANGE_ME setup safety

Bumps the report schema to v0.19 (additive) to make high-risk findings
reviewable enough for PR/release workflows without grep:

- Finding.policy_evidence_source (new): manifest pointer + line for
  findings whose triggering evidence lives in two places — the tool
  itself (Finding.source) and the missing-mitigation slot in the
  manifest (e.g. /policies/require_approval_for_tools).
- ReleaseDecisionItem.{source, policy_evidence_source} mirror the
  finding fields so packet re-rendering and reviewer surfaces
  (markdown, SARIF, GitHub Step Summary, scenario YAML) cite both
  the tool and manifest sites for the same release item.
- load_manifest_with_positions() builds a YAML PositionIndex for the
  manifest; ScanContext threads it; tool_finding/agent_finding accept
  an optional policy_evidence_pointer that resolves to a structured
  manifest line. Errors stay ConfigError so doctor/scan exit codes
  are unchanged.
- High-risk emitters (policy/side_effects/manifest_scope/auth/HITL
  evidence) pass the real manifest pointers and gain a second SARIF
  physicalLocation. Pointers use actual schema fields
  (require_approval_for_tools, validation/required_evidence/...).

Setup safety (CHANGE_ME placeholders):

- cli/scan.py wires collect_placeholders into source_warnings so
  unresolved CHANGE_ME entries trip the existing
  source_warning_count > 0 → review_required branch in
  release_decision.evidence_coverage.

Catalog-driven escalation override:

- CheckMetadata.requires_human_review_regardless_of_patch (new):
  set True on 12 approval / confirmation / idempotency /
  broad-scope / prohibited-action / runtime-trace / HITL-evidence
  check IDs. annotate_remediation forces autofix_safe=False before
  derive_agent_action runs, so a high-confidence non-manual patch
  on these check IDs lands at propose_patch_for_review (never
  auto_apply) and Finding.autofix_safe /
  Finding.requires_human_review / agent_action stay in agreement.

Reviewer surface threading:

- SARIF emits dual physicalLocations per result.
- Packet markdown §1 (Blockers / Review items) and §2 (Capability
  intent divergences) append `(path:line)` citations.
- CapabilityFact.source_ref enriched with `#L{line}` when known.
- tool_inventory rows gain source_path/source_start_line/source_pointer
  so post-scan renderers can cite path:line without re-parsing.
- GitHub Step Summary highlights append `(path:line)` from the
  enriched tool_inventory lookup.
- Scenario YAML rows carry a `source: {tool, policy_evidence}`
  block per row when structured pointers are available.

Stability invariants preserved:

- _run_id excludes policy_evidence_source entirely (same rationale
  as the v0.11 structured-source exclusion). Run IDs unchanged.
- finding_fingerprint excludes source/policy_evidence_source from
  the identity hash; existing baselines stay matched.
- agent_finding's legacy source.ref/location strings stay None on
  the new structured path so the legacy hash inputs don't drift.

Docs: AGENTS.md, README.md, agent-contract-current.md, autofix-policy.md,
agent-autofix-boundary.md, examples.md, faq.md, INDEX.md, llms.txt,
llms-full.txt, .well-known/agents-shipgate.json, skills/SKILL.md all
mention v0.19 as current. The v0.18 schema is preserved as a frozen
reference.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Address review: bump packet schema 0.5→0.6, freeze legacy source.ref, revert CapabilityFact mutation

Fixes four reviewer findings on PR #103:

1. [P1] Packet schema bump (v0.5 → v0.6). The previous commit added
   `ReleaseDecisionItem.source` and `policy_evidence_source` to
   packet.json but left `packet_schema_version` at "0.5" and
   overwrote docs/packet-schema.v0.5.json in place. Consumers
   validating existing v0.5 packets with `additionalProperties:
   false` would reject the new artifacts even though the version
   said nothing changed.
   - Restore docs/packet-schema.v0.5.json from the pre-PR git state
     (frozen reference).
   - Bump `packet_schema_version` Literal to "0.6" in
     schemas/packet.py.
   - Regenerate docs/packet-schema.v0.6.json.
   - Add v0.5 → v0.6 upgrade path in packet/json_packet.py.
   - Update INDEX, agent-contract-current, AGENTS, README,
     skills/SKILL, llms.txt, .well-known, faq, STABILITY, and tests
     to reference v0.6 as current with v0.5 as frozen.

2. [P1] Stop churning `agent_finding` source.ref. The previous commit
   set `source.ref = f"{manifest}#{pointer}"` when a
   policy_evidence_pointer was supplied. `_run_id` excludes
   structured fields and policy_evidence_source but still hashes
   legacy `source.ref` for backwards compatibility, so agent-level
   high-risk findings (e.g. SHIP-AUTH-MANIFEST-BROAD-SCOPE) got new
   run_ids and broke reviewer-link/baseline identity continuity.
   - Keep `source.ref` as the bare manifest name. The pointer lives
     ONLY in the structured `pointer` field plus
     `policy_evidence_source`. Verified: scan of a manifest with
     broad scope now emits `source.ref="shipgate.yaml"` with
     `source.pointer="/permissions/scopes"`, run_id unchanged from
     the v0.18 era.

3. [P2] Stop enriching `CapabilityFact.source_ref` with `#L{line}`.
   STABILITY.md treats `CapabilityFact.source_ref` as a stable
   contract. Existing OpenAPI refs already contain JSON-pointer
   fragments (e.g. `api.yaml#/paths/...`), so appending `#L42`
   produced ambiguous strings like `api.yaml#/paths/...#L42`.
   - Revert `_enriched_source_ref`. The reviewer-grade line citation
     still lives on the enriched tool_inventory rows
     (`source_path` / `source_start_line`) and on each finding's
     structured `source.path` / `source.start_line` — both
     unambiguous. CapabilityFact.source_ref stays byte-stable.

4. [P2] Update remaining v0.18/v0.17/v0.16 doc references that
   slipped through. README.md:419, docs/overview.md:45,
   docs/ai-search-summary.md:90, docs/baseline.md:40,
   docs/report-reading-for-agents.md tables all now reference v0.19
   as current.

Test goldens regenerated; full suite (1663 tests) passes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Address review #3: thread source into surface diff rows, dedupe agent-finding citations, fix stale v0.5 prose

Fixes three reviewer findings on PR #103.

P1 — Action/Tool Surface Diff rows now carry tool source:

- New `enrich_action_surface_diff_with_source(diff, tool_source_index)`
  in report/action_surface_diff.py appends `(source: path:line)` to
  every change-row `reason` when the underlying tool's structured
  source is known.
- New `enrich_tool_surface_diff_with_source(diff, tool_source_index)`
  in report/tool_surface_diff.py does the same for tool-surface
  control rows.
- New `_tool_source_index(tools)` helper in cli/scan.py builds the
  tool-name → (path, line) map; scan.py wires it into both the
  internal and public diff computation paths.
- packet/builder.py `_tool_surface_diff_highlights` and
  `_action_surface_diff_highlights` now accept the same index and
  append `(path:line)` suffixes to §3A / §3B highlight bullets.
- `build_packet_from_report` rebuilds tool source fields from the
  enriched `tool_inventory` rows (`source_path`, `source_start_line`,
  `source_pointer`) so the rebuilt-from-report packet path keeps the
  citation surface working.
- Unit tests cover both the enrichment helper (with and without a
  source index) so regression on the contract is caught at the
  module boundary.

P2 — Agent-level finding citations no longer duplicate:

- `agent_finding()` no longer sets `policy_evidence_source`. For
  agent-level findings the primary `Finding.source` IS the manifest
  pointer (path, start_line, pointer are identical to what the
  secondary would carry), so emitting both forced every downstream
  renderer to dedupe. Setting it to None at the source keeps the
  contract clean: secondary lives only on `tool_finding` cases where
  tool source ≠ manifest pointer.
- Defensive renderer-level dedupe lands in three places:
  - packet/markdown.py `_dual_citation(primary, secondary)` suppresses
    the secondary when its `path:line` suffix equals the primary's.
  - report/sarif.py compares `physicalLocation` dicts and skips
    duplicates so SARIF results never carry two identical jump
    targets.
  - cli/scenario.py `_source_block` returns `tool` only when the
    `policy_evidence` pointer block is byte-equal to it, so scenario
    YAML rows stay terse.
- The sample packet now reads
  `Manifest declares broad permission scopes — shipgate.yaml:60`
  (was: `... — shipgate.yaml:60 — shipgate.yaml:60`).

P3 — Stale v0.5 packet prose in agent-facing surfaces:

- AGENTS.md heading `### Release Evidence Packet (v0.5)` → `(v0.6)`.
- docs/agent-contract-current.md paragraph starting
  "Packet schema 0.5 preserves the v0.4 HITL fields ..." rewritten
  to lead with v0.6 (citing the new dual-source pointer fields) and
  to describe v0.5 as the predecessor whose fields are preserved.

Test plan:

- `python -m pytest` — 1666 passed, 4 skipped (full suite).
- Smoke against `samples/support_refund_agent`:
  - Agent-level `SHIP-AUTH-MANIFEST-BROAD-SCOPE` finding carries
    `policy_evidence_source=None` and exactly one SARIF location.
  - Diff with `--diff-from` enables tool/action surface diff;
    helpers run cleanly.
- Sample goldens (report.json, report.md, packet.{md,json,html}) and
  llms-full.txt regenerated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Address review #5: exclude v0.19 source fields from action-policy finding evidence

`ActionSurfaceChange` gained optional `source_path` /
`source_start_line` fields in this PR, but
`evaluate_action_surface_policies` dumps the change into
`Finding.evidence` via `change.model_dump(mode="json")`, which
unconditionally includes those keys as `null`.
`finding_fingerprint` hashes canonicalised `evidence`, so the mere
presence of the new keys shifts every existing action-surface
finding fingerprint relative to pre-v0.19 baselines.

Fix: new private `_change_evidence(change)` helper in
`report/action_surface_diff.py` that dumps with `exclude={"source_path",
"source_start_line"}`. All four `evidence={"change": ...}` call sites
in `evaluate_action_surface_policies` route through the helper.
`ActionSurfaceChange` keeps the structured fields on the diff row
itself (renderers and post-scan consumers still see them); only the
finding-evidence projection drops them.

Verified: the legacy change payload now hashes identically before and
after enrichment — `fp_fe9dd3a3a7e07d00` matches across
pre-fix-legacy, post-fix-bare, and post-fix-enriched dumps. Test
`test_action_policy_finding_evidence_excludes_v019_source_fields`
pins the contract.

Test plan:
- 1677 passed, 4 skipped (full suite).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant