Skip to content

Reject stale frozen player inventory hashes - #1307

Merged
Eli Pinkerton (wallstop) merged 1 commit into
mainfrom
task/frozen-player-inventory-python-20261121
Nov 22, 2026
Merged

Eli Pinkerton (wallstop) merged 1 commit into
mainfrom
task/frozen-player-inventory-python-20261121

Conversation

@wallstop

Copy link
Copy Markdown
Collaborator

DISCLOSURE: LLM-GENERATED TEXT

Why:

The frozen player inventory could report an old SHA-256 if an already-hashed file changed without changing length.

What:

  • Move declared files, player payloads, and replay project inventory into the locked Python worker.
  • Recheck the checkout and filesystem before returning inventory rows. Retain Windows read handles through the final check.
  • Preserve row order, receipt fields, and the partial diagnostic for a declared hash mismatch.

Refs #859

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Python worker now handles frozen player inventory requests, including checkout checks, file hashing, and stability checks. PowerShell sends inventory requests to the worker and emits the returned rows. Tests cover inventory results, file changes, and checkout validation.

Changes: Frozen player inventory

Layer / File(s) Summary
Worker inventory request and validation
scripts/unity/frozen_files.py, scripts/tests/test_frozen_files.py
The worker validates inventory requests, inventories files and directories, checks declared hashes and filesystem stability, and returns rows or errors. Tests cover inventory metadata, hash mismatches, file changes, and checkout validation.
PowerShell inventory delegation
scripts/unity/lib/frozen-player-files.ps1, scripts/unity/lib/source-census-python.ps1, docs/performance/agent-iteration.md
The census wrapper sends inventory request fields to the worker. The frozen-player script emits returned rows and reports census errors. The documentation describes the inventory request checks and output.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant FrozenPlayerFiles as frozen-player-files.ps1
  participant Census as Invoke-WProtoSourceCensus
  participant Request as execute_request
  participant Inventory as frozen_player_inventory
  FrozenPlayerFiles->>Census: Submit inventory request
  Census->>Request: Send repository, declarations, and file limit
  Request->>Inventory: Run frozen player inventory
  Inventory-->>Request: Return rows or error
  Request-->>Census: Return inventory result
  Census-->>FrozenPlayerFiles: Emit inventory result
Loading

Possibly related PRs

Merge Risk: Minimal · up to 76660

Frozen player inventory now runs in the locked Python worker and rejects hashes that go stale when a file changes without changing length. The reviewed paths show no actionable merge-blocking issue.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main behavior change: the frozen player inventory now rejects stale SHA-256 hashes for files that changed without changing length. The changeset adds persistent-change detection, c…
Description check Passed The description follows the repository template. It has a one-sentence Why, a What section with three one-line bullets in plain language, and a Refs #859 line. The Why sentence states the problem clea…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main behavior change: the frozen player inventory now rejects stale SHA-256 hashes for files that changed without changing length. The changeset adds persistent-change detection, checkout and root rechecks, and a declared-hash mismatch error, so the title matches the primary change. It is concise and specific, and it does not use file lists or vague terms.

Full details: Description check

Explanation

The description follows the repository template. It has a one-sentence Why, a What section with three one-line bullets in plain language, and a Refs #859 line. The Why sentence states the problem clearly. The Fixes keyword is correctly not used. The DISCLOSURE line is an extra header that does not conflict with the template. Minor gap: the description does not mention the new inventory operation or the replay project inputs in detail, but the template asks for brevity and detail belongs in the linked issue.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review details

Context from checks skipped due to timeout: 10

  • GitHub Check: Unity package export smoke
  • GitHub Check: Unity 6000.6.0f1 (selected modes)
  • GitHub Check: CodeRabbit
  • GitHub Check: Type-check (sources)
  • GitHub Check: generator
  • GitHub Check: Contract Suites
  • GitHub Check: Windows tools (orchestration)
  • GitHub Check: Windows tools (metadata)
  • GitHub Check: Type-check (controls)
  • GitHub Check: Repo Lint
Additional context used

Code guidelines: 4

.llm/context.md — auto-discovered
.agents/skills/add-inspector-attribute/SKILL.md — Agent Skill
.agents/skills/honest-gates/SKILL.md — Agent Skill
.claude/skills/test-odin-drawers/SKILL.md — Agent Skill
Path-based instructions: 2

Applicability reference: AGENTS.md: # Repository Guidelines See the [AI Agent Guidelines](./.llm/context.md) for all AI agent guidelines.

CodeRabbit inference engine (.llm/context.md)

Files:

  • docs/performance/agent-iteration.md
Source excerpt:

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DISCLOSURE: LLM-GENERATED TEXT

OpenAI review: 1 finding.

The payload inventory no longer enforces its previous 100,000-entry limit. Large payloads can consume unbounded memory and produce an oversized response.

10983 in, 3945 out tokens. Comments only; this review never blocks a merge.

Comment thread scripts/unity/frozen_files.py Resolved
@wallstop
Eli Pinkerton (wallstop) merged commit c2e2d9a into main Nov 22, 2026
31 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the task/frozen-player-inventory-python-20261121 branch November 22, 2026 01:41
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.

1 participant