Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

fix: address review findings round 1 (PR #786)#796

Closed
github-actions[bot] wants to merge 2 commits into
mainfrom
fix/issue-379-migration-hardening-1909dc21
Closed

fix: address review findings round 1 (PR #786)#796
github-actions[bot] wants to merge 2 commits into
mainfrom
fix/issue-379-migration-hardening-1909dc21

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Addresses expert review findings from PR #786 round 1.

Findings Fixed (4)

# Severity File Fix
1 🟡 MODERATE SettingsPersistenceTests.cs:27,41 #settings-page.settings-page (ID→class selector)
2 🟡 MODERATE SettingsPersistenceTests.cs:44 Added Assert.True(hasModeSection, ...)
3 🟡 MODERATE ConnectionSettings.cs:390 Added else branch with Debug.WriteLine when Save() fails
4 🟢 MINOR ConnectionSettingsTests.cs:654,666 Real chmod 555 instead of no-op FileAttributes.ReadOnly; Record.Exception + Assert.Null instead of tautological result || !result

Findings Skipped (2)

# Severity File Reason
5 🟢 MINOR ConnectionSettings.cs:403 Null-forgiving ! cosmetic; protected by nested catch {}
6 🟢 MINOR Settings.razor:~904 Dead catch in SaveSettingsQuietly() outside diff; harmless defensive coding

Tests

All 3,579 unit tests passed

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • 192.0.2.1

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "192.0.2.1"

See Network Configuration for more information.

Generated by Review & Fix · ● 5.1M ·

github-actions Bot and others added 2 commits April 28, 2026 17:13
Three follow-up items from the PR #377 consensus review:

1. Save() now returns bool (true on success, false on failure). The
   Keychain cleanup in RecoverSecretsFromSecureStorage is gated on
   Save()'s return value instead of File.Exists(SettingsPath), which
   was unsafe: a prior settings file could exist even if the current
   Save() failed (e.g., disk full), causing Keychain entries to be
   deleted without the recovered values persisted.

2. The outer catch {} in RecoverSecretsFromSecureStorage now logs to
   Debug.WriteLine and appends to ~/.polypilot/crash.log, matching
   the existing crash-log convention.

3. ReadSecureStorage gets a doc comment explaining the intentional
   sync-over-async Task.Run pattern (one-time migration, not hot path).

Unit tests added for Save() return value behavior.
Integration test added for Settings page navigation.

Fixes #379

Co-authored-by: copilot-agentic-workflow[bot] <224017+copilot-agentic-workflow[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix CSS selectors in SettingsPersistenceTests (#settings-page -> .settings-page)
- Add missing assertion for hasModeSection in SettingsPage_ShowsConnectionMode
- Add diagnostic logging when Save() fails in RecoverSecretsFromSecureStorage
- Fix tautological assertion and use chmod for real POSIX permission enforcement in Save_ReturnsFalse_WhenPathIsReadOnly

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen

Copy link
Copy Markdown
Owner

Stale fix-round PR — fixes were pushed to the main PR branch.

@PureWeen PureWeen closed this Apr 30, 2026
@PureWeen PureWeen deleted the fix/issue-379-migration-hardening-1909dc21 branch April 30, 2026 20:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant