Skip to content

ios: coach steady blur on alpha - #317

Draft
SamGu-NRX wants to merge 4 commits into
alphafrom
gpt-burst/1022w2-ios-blur
Draft

SamGu-NRX wants to merge 4 commits into
alphafrom
gpt-burst/1022w2-ios-blur

Conversation

@SamGu-NRX

@SamGu-NRX SamGu-NRX commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Ports a097c66 from #104 to alpha

Finding: CoachingDebouncer's rolling 15-frame median catches up with steady blur within about one second. Since blur coaching appears after two seconds, steady blur never produced coaching. This port holds a pre-spell 1.5-second sharpness median as a fixed reference and counts frames below the gate ratio against it. A package test covers the real AutoCapture gate, sustained blur, and recovery.

Conflict resolutions: cherry-pick applied cleanly on alpha, so no conflicts required resolution. The resulting ScanEngine.swift changes pass frame sharpness into the debouncer while preserving alpha's surrounding code. ScreenStatesUITests.swift retains alpha's existing state list and adds the reference card assertion.

Failing-first evidence: on unchanged alpha, ~/.long-run/bin/heavy swift test --filter Coaching failed to compile because the new test passed sharpness to the old debouncer API (extra argument 'sharpness').

Counts using ~/.long-run/bin/heavy swift test --filter Coaching: alpha baseline 16 tests in 2 suites passed; changed branch 18 tests in 2 suites passed.

Counts using ~/.long-run/bin/heavy swift test: alpha baseline 969 tests in 130 suites passed with 1 known issue; changed branch 971 tests in 130 suites passed with 1 known issue.

No Xcode app build or simulator run was performed. The app-target change was not independently compiled by the package tests.

🤖 Generated with Claude Code

Repeated blur recovery and app build verification

adcd0918 excludes frames judged blurry from the rolling reference buffer. Sharp recovery frames remain eligible during the coaching's clearing delay, so a brief recovery can establish the next spell's reference without inheriting the previous spell's low sharpness.

eachBlurSpellUsesSharpnessBeforeThatSpell fails if a second sustained blur after a short sharp gap receives no coaching. It uses the existing Frame/run helpers with 2 seconds sharp, 3 seconds blurry, a 0.6-second sharp gap, then 3 seconds blurry. On 8f32ed51, the first blur was coached but the final assertion failed because the second blur returned nil. The same test passes with the fix.

Checks ran with NODE_ENV unset and the heavy wrapper. Capacity checks before each test run and the app build showed at least 6 GB free and memory pressure 1.

  • In ios/HouseScanKit, ~/.long-run/bin/heavy swift test --jobs 2 --filter CoachingDebouncerTests: before the fix, 18 tests with the expected regression failure; after the fix, all 18 passed.
  • In ios/HouseScanKit, ~/.long-run/bin/heavy swift test --jobs 2: 974 tests in 130 suites passed with 1 known issue.
  • In ios, ~/.long-run/bin/heavy xcodebuild -list found the app scheme HouseScan.
  • In ios, ~/.long-run/bin/heavy xcodebuild -scheme HouseScan -destination 'generic/platform=iOS Simulator' -derivedDataPath /tmp/bs-blur-dd build CODE_SIGNING_ALLOWED=NO: BUILD SUCCEEDED. The app-target changes compile; no compile fixes were needed. This build does not compile or run the UI-test target, and no simulator was booted.

Derived data and HouseScanKit/.build were deleted after the build. The Codex repeated-blur review thread was answered and resolved.

The gate compares each frame with the median of its last 15, so steady
blur stops reading as blurry within a second, and with blur shown only
after 2 s its coaching never came up. The debouncer now also counts a
frame as blurry when it is under the gate's ratio of the median
sharpness from the 1.5 s before the spell began, held fixed while the
spell lasts. A short drop, such as a tilt, still says nothing, and steady
blur shows from 2 s in until the photos are sharp again. A package test
runs the real gate into the debouncer. The dark walk card is also
checked at AX5.

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

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:M 30-99 effective changed lines. label Oct 22, 2026
@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T18:10:47.650564Z adcd091 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7094fbf426

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ios/HouseScanKit/Sources/HouseScanKit/Guidance/CoachingDebouncer.swift Outdated
…indow

Codex on #317: frames with no sharpness measurement append nothing and
never pruned the buffer, so after a gap the median came from sharpness
older than blurReferenceWindow. A scene merely softer than the one before
the gap then read as blur and was coached. Prune by time before taking the
median.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df44d5e089

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ios/HouseScanKit/Sources/HouseScanKit/Guidance/CoachingDebouncer.swift Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SamGu-NRX

Copy link
Copy Markdown
Owner Author

Fixed in 8f32ed5. Supplemental sharpness blur evidence now runs only when the gate reached sharpness, and rejected-frame sharpness values stay out of the reference buffer. Regression: tooDarkFramesDoNotCreateBlur. Tests: heavy swift test --filter CoachingDebouncerTests (17 passed); heavy swift test (973 passed, 1 known issue).

@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f32ed5139

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ios/HouseScanKit/Sources/HouseScanKit/Guidance/CoachingDebouncer.swift Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SamGu-NRX

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: adcd09181d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants