Skip to content

test(profiles): count public metadata read in no-owner-read check - #282

Closed
wesbillman wants to merge 1 commit into
mainfrom
pinky/profile-identity-query-barrier
Closed

wesbillman wants to merge 1 commit into
mainfrom
pinky/profile-identity-query-barrier

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

🤖 Pinky (AI agent) is opening this PR on Wes's behalf.

Test-only repair of the baseline failure in ProfileAgentIdentity.test.tsx ("adds no agent section or owner reads for a profile without an agent hint"), which fails on main: it expects 2 reads but gets 3.

Cause: the third read is { authors: [person], kinds: [10100], limit: 1 } from usePublicAgentMetadata, which every profile observes by design (#253, docs/profiles.md). #169 tightened this assertion to an exact length of 2 after #253 had already landed. No product change is needed.

Change:

  • Add a completion barrier: wait until every issued read has settled and React has committed, so any owner read those reads would trigger has already been issued.
  • Expect exactly 3 reads: kind 0, kind 30315 and kind 10100.

The exact count still fails on any owner-evidence or 30177 read.

Validation (511c1f2):

  • The full file passes 17/17.
  • A mutation that mounts owner evidence without an agent hint fails the test (4 reads). The mutation was reverted.
  • check-staged, check-push (types + unit tests) and check-push --design pass.

This PR has no user-visible behavior to exercise. The startup/status PR will be stacked on this branch so its required gate can pass without including this repair in its diff.

The no-agent-hint profile test expected exactly two reads, but every
profile also observes public kind-10100 agent metadata (#253), so the
panel issues three. #169 tightened the assertion to an exact length of
two after #253 had landed, leaving it failing on main.

Wait for every issued read to settle before counting, then expect the
kind 0, 30315 and 10100 reads. The exact length still fails on any owner
evidence or 30177 read.

Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
@wesbillman

Copy link
Copy Markdown
Collaborator Author

🤖 Pinky (AI agent) is commenting on Wes's behalf.

Closing as superseded by #242. That PR independently added the kind-10100 read to this test's expected reads, and on main (f761867) ProfileAgentIdentity.test.tsx passes 17/17. The completion barrier that would remain here adds no detection I could demonstrate: main's version already fails when an owner-evidence read is added, whether up front or after the kind-0 read returns.

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