Skip to content

Hint system improvements and macOS CI test workflow - #12

Merged
austin-smith merged 6 commits into
mainfrom
hint-system-improvements
Feb 21, 2026
Merged

austin-smith merged 6 commits into
mainfrom
hint-system-improvements

Conversation

@austin-smith

Copy link
Copy Markdown
Owner

Summary

  • Improves hint/auto-move quality by introducing advisability-aware evaluation.
  • Adds regression/performance coverage for the new hint behavior.
  • Adds GitHub Actions CI to run macOS unit tests on PRs and merge queue.

Gameplay and Hint Logic

  • Split move evaluation into legal vs advisable paths.
  • Added stricter foundation rollback rules: only allow rollback hints when they unlock immediate forward progress.
  • Centralized candidate selection in AutoMoveAdvisor and reused it in HintAdvisor.
  • Updated foundation-tap auto-move path to use advisable destinations and avoid unnecessary failure haptics.

Tests

  • Added ComputerSolitaireTests unit test target.
  • Added HintAdvisabilityTests for:
    • non-advisable rollback rejection
    • advisable rollback acceptance when it reveals progress
    • determinism of best-hint selection
    • hint evaluation performance smoke check

CI and Workflow

  • Added .github/workflows/ci.yml:
    • triggers on pull_request to main and merge_group
    • runs xcodebuild test on macos-26
    • uploads .xcresult bundle on failure
    • uses concurrency cancellation for duplicate in-flight runs
  • Updated repo workflow docs/config to match (AGENTS.md, .gitignore).

Consolidate and enhance move evaluation logic in AutoMoveAdvisor: add candidateSelections, allEvaluations, bestAdvisableMoveEvaluation/bestAdvisableDestination, isAdvisableMove and helper heuristics (immediate gains, foundation unlock checks). Change mobility scoring to use candidateSelections. Simplify HintAdvisor to rely on AutoMoveAdvisor (remove duplicated selection and filtering code). Update GameSession to attempt advisable auto-moves from tapped foundations and make queueBestAutoMove accept an optional playFailureFeedback flag. Also add a macOS build workflow snippet to AGENTS.md.
Add a new ComputerSolitaireTests target and test suite, update project files, and refactor advisor logic. Updates include: adding ComputerSolitaireTests.xctest target to the Xcode project, adding HintAdvisabilityTests.swift with multiple unit and performance tests, and adding a Test Workflow snippet to AGENTS.md. AutoMoveAdvisor.swift was refactored: foundationMoveUnlocksForwardFollowUp was renamed and replaced by isFoundationRollbackAdvisable and decomposed into smaller helpers (OpportunityBaseline, FoundationRollbackPolicy, ImmediateOpportunity and ranking logic), plus new evaluation and selection logic for assessing rollback/advisability. Also update .gitignore (build/ -> .build/).
Add .github/workflows/ci.yml to run macOS unit tests on pull requests and merge groups. Introduces a macOS job (runs-on: macos-26) that checks out the repo, runs xcodebuild test for ComputerSolitaire (Debug configuration, platform=macOS) with code signing disabled, and uploads the test result bundle on failure. Also configures minimal permissions and concurrency to cancel in-progress runs for the same workflow/ref.
Update the GitHub Actions workflow name in .github/workflows/ci.yml from 'CI' to 'Build & Test' to make the purpose more explicit in the Actions UI.
Rename macOS job to "macOS Build & Test" and add a new iOS Build job to the GitHub Actions workflow that runs xcodebuild for the iOS Simulator (code signing disabled). Update the Xcode project file: insert a PBXContainerItemProxy section, move/re-add the test XCBuildConfiguration blocks, and bump MARKETING_VERSION from 0.4.1 to 0.5.0 for the relevant targets. These changes enable basic iOS CI builds and update the project metadata.
@austin-smith

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: 8d599b6809

ℹ️ 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 .gitignore
@austin-smith
austin-smith merged commit 435360f into main Feb 21, 2026
2 checks passed
@austin-smith
austin-smith deleted the hint-system-improvements branch February 21, 2026 22:12
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