Skip to content

Replace the agileplace.py sha256 approval-list pins with structural gates #109

Description

@thewrz

This was written agentically; verify its assertions and edit accordingly:

Raised by the Codex adversarial review on PR #106.

Two tests pin agilesync/board/agileplace.py by content hash:

  • tests/test_regression_budget.py::test_agileplace_py_is_byte_for_byte_unchanged_by_comment_sync
  • tests/test_description_sync_wiring_fixtures.py::test_agileplace_py_is_byte_for_byte_unchanged_by_issue_66

Both exist to enforce a real architectural decision — comment I/O belongs in agileplace_comments.py, description I/O in agileplace_description.py, never inlined into agileplace.py. But a hash cannot express that. Every legitimate change to the file (#93s link_label, #105s conflict-retry path table) has to re-anchor the constant, which makes them approval lists rather than gates: the invariant they advertise (byte-for-byte invariance for issue #66) is not what they actually check any more, and a reviewer reading a re-anchor commit has to take the authors word that nothing forbidden moved in.

Suggested replacement

Assert the actual boundary, in the style of tests/test_board_layout_import_boundary.py:

  • agileplace.py defines no comment I/O and no description read/write helpers (no comment/description API paths built in that module — the description op-builder lives in agileplace_description.py, and _card_value_for_patch_paths /description branch reads a snapshot field rather than performing I/O).
  • agileplace.py imports neither agileplace_comments nor agileplace_description nor any syncers.* module (one-way dependency).
  • Keep the existing line-count budget + hard cap, which already catch bulk growth.

Such assertions survive legitimate edits and fail on the actual violation, so no future PR needs to re-pin anything.

Testing

  • New boundary assertions fail when comment/description I/O is deliberately inlined into agileplace.py (verify by temporarily doing it)
  • Both hash pins removed, along with their re-anchor comment trail
  • Full suite green

🤖 Co-authored by Claude Opus 5.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions