Skip to content

[WIP] Implement first half of startup/config/error-handling stabilization#5

Merged
danielsobrado merged 1 commit into
mainfrom
copilot/implement-startup-config-error-handling
Mar 27, 2026
Merged

[WIP] Implement first half of startup/config/error-handling stabilization#5
danielsobrado merged 1 commit into
mainfrom
copilot/implement-startup-config-error-handling

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Create a real implementation pull request in danielsobrado/P2P-Market-Data to replace the previously merged planning-only PRs. This PR should implement the first half of the pending fixes: startup/config/error-handling stabilization.

The previous PRs #3 and #4 appear to have merged without code changes, so this PR must contain actual source changes.

Goals

Make startup deterministic, testable, and consistent across entrypoints.

Scope

Likely files:

  • app.go
  • main.go
  • cmd/app/main.go
  • pkg/config/...
  • any new shared bootstrap/init package needed
  • relevant tests

Required implementation work

  1. Remove logger.Fatal/process-terminating behavior from non-top-level lifecycle code.

    • Lower layers should return errors.
    • Only top-level main() should decide whether to exit.
  2. Unify configuration loading across Wails and CLI entrypoints.

    • Avoid hardcoded config in NewApp() if possible.
    • Reuse the canonical config loader.
    • Both entrypoints should use the same config source of truth.
  3. Make Wails log level configurable instead of always returning DEBUG.

  4. Stop constructing partial ad hoc ScriptConfig structs in CLI startup.

    • Reuse canonical config and override only what is necessary.
  5. Improve startup failure cleanup/error propagation.

    • If initialization fails partway through, clean up partially started resources where appropriate.
  6. Add/update tests for key startup/config failure paths.

Acceptance criteria

  • Actual code files are changed.
  • Startup failure paths return errors from lower layers.
  • Wails and CLI startup share config behavior.
  • Log level is config-driven.
  • Tests are added/updated for meaningful failure paths.

Important

This PR must contain real code changes, not only a plan or checklist.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Is there anything else pending?

Assistant: Yes — there is still pending work.

What’s done:

  • I submitted the request to create PR 1 for startup/config/error-handling.

What’s still pending:

  • PR 1 is not yet confirmed merged or completed
  • PR 2 has not been created yet
  • The broader recommended fixes are still not all covered unless we expand PR 2’s scope

Pending by area

Pending PR work

  1. PR 1 — startup/config/error handling
    Status: requested, but not confirmed complete

  2. PR 2 — script execution lifecycle hardening
    Status: still pending creation

Additional issues still pending unless bundled into PR 2

  1. P2P correctness fixes

    • connection count drift
    • invalid DHT record selection fallback
    • message signing coverage
    • running-state synchronization/config TODO cleanup
  2. Migration/tooling safety

    • Python migration cleanup guard
    • SQL identifier safety/quoting
  3. Frontend script UX consistency

    • refresh state after script actions
    • improve connection status updates

Short answer

Yes — there is still pending work.
At minimum:

  • PR 2 still needs to be created
  • PR 1 still needs to finish successfully

If you want, I can now redefine PR 2 to include all remaining items, so the 2-PR plan truly covers everything.

User: Go ahead

Assistant: I’ve submitted the second PR request covering the remaining fixes, so the pending implementation work is now queued in 2 PRs.

Still pending overall:

  • PR 1 must finish being generated and reviewed
  • PR 2 must finish being generated and reviewed
  • After that, the changes still need to be merged before the repo is fully fixed

So the short answer is: yes, there’s still pending work operationally, but no additional PR requests are pending from my side right now.

Assistant: The pull request for hardening script execution and fixing remaining runtime, P2P, migration, and frontend issues is being created now.
You can track its status here: PR Link.

Once both PRs are ready, please review and merge them to address the full scope of recommended fixes. Let me know if there’s anything else you’d like to adjust!

User: Anything pending now?

Assistant: Yes — a few things are still pending.

Current status

  • PR 1: requested earlier, but I do not have a confirmed PR URL from the tool in this chat.
  • PR 2: you shared https://github.com/danielsobrado/P2P-Market-Data/pull/3, so that one appears to exist.

What’s still pending

  1. PR 1 confirmation

    • I still need the actual PR link/number for the first PR, or confirmation that it was created successfully.
  2. Review/merge

    • Even if both PRs exist, the fixes are not fully “done” until they’re reviewed and merged.
  3. Validation after merge

    • Recommended final checks:
      • run Go tests
      • run frontend build/tests if available
      • smoke test Wails startup
      • smoke test script execution/start-stop flow
      • smoke test peer connection be...

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@danielsobrado danielsobrado marked this pull request as ready for review March 27, 2026 07:59
Copilot AI review requested due to automatic review settings March 27, 2026 07:59
@danielsobrado danielsobrado merged commit c551679 into main Mar 27, 2026
1 of 2 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot stopped work on behalf of danielsobrado due to an error March 27, 2026 07:59
Copilot AI requested a review from danielsobrado March 27, 2026 07:59
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.

3 participants