Public: anyone can read this; the crew can change it.

Looks that work well: a failed picture is retried, a sleeping app says so, a card says why it has no picture, and the thumbs are the ones the owner would choose #1449

Closed opened this in answer to
Closed without merging

This pull fixes the test that failed the last check. The #1150 code was already on the branch and was fine. I didn't change the code, so none of the issue's behaviour changed.

Notes

stopped closed without shipping deploy 60499bf

opened this

This pull fixes the test that failed the last check. The #1150 code was already on the branch and was fine. I didn't change the code, so none of the issue's behaviour changed.

What was wrong: the test "a failed picture is retried on a doubling schedule, a thumb a week old is retaken, a failed retake keeps the picture, and an app that is not serving is skipped with its reason (#1150)" depended on state left by the test before it. That test leaves a failed thumb row ("the browser fell over"), and the retry test then counted that row's attempts as its own. It expected attempts of 1 and got 2. The later test about access changes broke the same way.

What I changed: only test/looks.test.ts. The retry test now deletes the thumb rows for the app, takes a fresh thumb, and checks it is clean before it records any failures. The test was wrong here, not the code.

Tests: bun test test/looks.test.ts passes 15 of 16. test/front.test.ts passes. The one failure is "a real capture through the grant door, with /usr/bin/chromium". My sandbox won't let Chromium open its socket, so that test can't run here. I expect the forge's check to run it for real.

Not run: tsc can't load the bun types in my sandbox, so I haven't type-checked the change. It is a test-only edit.

Left out: I didn't split the issue. Everything in its list, including the picture-retry schedule, the "not serving" skip and the weekly retake, is already on the branch with tests. To try it, run bun test test/looks.test.ts.

🤖 Generated with Claude Code

Closes #1150

2 earlier comments
commented

A failed look picture now waits twice as long before each retry, and the branch merges into main again.

The earlier check failed because main had added its own look migration 74 for attached looks (#1066). That clashed with my attempts migration, also numbered 74. I merged main and kept both sets of changes in src/core/looks.ts and src/core/schema.ts. Main keeps 74 and mine is now 75. recordLook writes the attached-look columns and the failure count together.

Type check and tests:

  • Type check: tsc could not run here because bun install did not provide the bun types. It was not checked.
  • Tests: I ran the looks and schema suites: 39 pass, 1 fails. The failure is the real chromium capture test, which the sandbox blocks (socket() failed: Operation not permitted). The forge's check runs it.

I did not run the whole check.

commented

I merged main into this branch and resolved the src/core/schema.ts conflict that failed the check. I pushed the result.

What changed

  • Migration number: main now uses migration 75 for limb_place, so the look attempts migration moves to 76. Both are in the file, in that order.
  • Type errors from the merge: main had added attachedBy and note to the look record, so two places no longer matched it.
    • The dry-run result in src/actions/attach_look.ts now includes attempts: 0.
    • The look fixture in test/looks-reasons.test.ts now includes attachedBy: null and note: null.

What I ran

  • bun x tsc --noEmit is clean.
  • bun test test/looks ran 25 tests: 24 pass and 1 fails. The failure is "a real capture through the grant door, with /usr/bin/chromium". Chromium couldn't create a socket in this sandbox, so it never took the picture. I didn't run the whole suite, so the forge's check will be its first full run.

Left out: the merge doesn't touch the retry behaviour itself: a failed picture waits twice as long before each retry, starting at five minutes and stopping at a day.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs