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

fix: address review findings round 2 (PR #806)#808

Closed
github-actions[bot] wants to merge 5 commits into
mainfrom
fix/issue-698-ee0a408e
Closed

fix: address review findings round 2 (PR #806)#808
github-actions[bot] wants to merge 5 commits into
mainfrom
fix/issue-698-ee0a408e

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Addresses 5 review findings from expert review round 2 on PR #806.

Findings addressed

# Severity Finding Status
1 🟡 MODERATE Advanced nav button visible in Remote/Demo modes ✅ Fixed — added mode guard
2 🟡 MODERATE SyncCliConfig() never called at startup — config drifts ✅ Fixed — added ImportCliConfigValues() that reads config.json at Settings page load
3 🟡 MODERATE Corrupt config.json silently drops unrelated CLI keys ✅ Fixed — SyncCliConfig now returns early on parse failure
4 🟡 MODERATE Upgrade overwrites user's manual config.json edits ✅ Fixed — ImportCliConfigValues() imports existing config.json values before any write
5 🟢 MINOR Integration tests have zero assertions ✅ Fixed — added Assert.True/Assert.Contains

Additional improvements

  • Atomic writes via temp-file-then-rename pattern (prevents torn reads)
  • 5 new unit tests for corrupt config abort, atomic write, and ImportCliConfigValues
  • Extracted GetCopilotConfigDir() helper to reduce duplication

Tests

✅ All 3666 tests pass (5 new tests added)

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 · ● 16.6M ·

github-actions Bot and others added 5 commits April 29, 2026 19:10
…bleAllHooks) in Settings UI

Add an Advanced section to the Settings page with toggles for three
Copilot CLI configuration options:

- **Compact Paste**: collapse large pasted content to save context tokens
- **Respect .gitignore**: exclude gitignored files from working-tree context
- **Disable All Hooks**: globally disable all CLI hooks

Implementation:
- Add CompactPaste, RespectGitignore, DisableAllHooks bool properties to
  ConnectionSettings with JSON round-trip support
- Add SyncCliConfig() method that merges these values into
  ~/.copilot/config.json (preserving existing keys)
- Register three new SettingDescriptors under 'Advanced' category in
  SettingsRegistry (hidden in Remote/Demo modes)
- Add Advanced nav item, section heading, and SettingEditor rendering
  in Settings.razor
- Wire OnSettingChanged to call SyncCliConfig() for advanced.* settings
- Add unit tests: defaults, round-trip, backward compat, SyncCliConfig
  write + merge, registry get/set/visibility/search
- Add integration test for Advanced section rendering

Fixes #698

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>
The Advanced nav button was visible in Remote/Demo modes even though
the corresponding section was empty (settings hidden by mode check).
Wrap the button with the same mode guard used by the registry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Return early on JSON parse failure instead of overwriting config.json
  with only PolyPilot keys (prevents silent data loss of unrelated CLI config)
- Add ImportCliConfigValues() to read config.json values at startup
  so PolyPilot picks up manual CLI edits
- Use temp-file-then-rename pattern for atomic writes (prevents torn reads)
- Extract GetCopilotConfigDir() helper to reduce duplication

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integration tests were logging results but never asserting, so they
always passed. Add Assert.True/Assert.Contains for section visibility
and content verification.

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

- SyncCliConfig_AbortsOnCorruptFile: verifies file unchanged on parse failure
- SyncCliConfig_AtomicWrite_UsesRename: verifies temp file cleanup
- ImportCliConfigValues_ImportsFromConfigJson: verifies import from config.json
- ImportCliConfigValues_IgnoresCorruptFile: verifies graceful handling
- ImportCliConfigValues_NoFileNoCrash: verifies missing file handling

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
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