Skip to content

feat: toggle git-server enabled on migration to external git - #1098

Merged
CasLubbers merged 13 commits into
mainfrom
APL-2194
Oct 1, 2026
Merged

CasLubbers merged 13 commits into
mainfrom
APL-2194

Conversation

@merll

@merll merll commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Deactivates the git-server while migrating to an external Git source. This becomes effective after apl-operator reloads.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 13:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

URL classification and default app enablement can incorrectly leave git-server enabled.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Disables the internal git-server app when migrating to an external Git repository.

Changes:

  • Disables git-server before committing and pushing the migration.
  • Adds migration toggle assertions.
File Description
src/​otomi-stack.ts Adds git-server deactivation during external migration.
src/​otomi-stack.test.ts Tests deactivation and non-migration paths.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/otomi-stack.ts
Comment thread src/otomi-stack.ts Outdated
Copilot AI balanced review requested due to automatic review settings September 30, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

URL classification and implicit app enablement can prevent the correct toggle behavior.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)

Copilot AI balanced review requested due to automatic review settings September 30, 2026 14:14
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Internal repository detection uses unreliable substring matching.

Review effort: Balanced
Findings: None

Resolved since last review (2)

Copilot AI balanced review requested due to automatic review settings September 30, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The implementation correctly persists the toggle before committing and adequately covers the affected migration paths.

Review effort: Balanced
Findings: None

Copilot AI balanced review requested due to automatic review settings October 1, 2026 08:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

saveAppToggle stores and writes different object shapes, causing inconsistent persisted state.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Add regression coverage for internal Git migration

src/​otomi-stack.test.ts:1529

The new hostname branch is only exercised with external URLs. Add a migration case targeting GIT_DEFAULT_CONFIG.repoUrl (with a changed source repo/branch) and assert that get/saveAppToggle are not called; otherwise a regression that disables the internal Git server during an internal migration would go undetected.

Comment thread src/otomi-stack.ts Outdated
Copilot AI balanced review requested due to automatic review settings October 1, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Catalog responses can violate the API schema, and canonical internal Git URLs may incorrectly disable their own server.

Review effort: Balanced
Findings: 2 High severity

Open (2)
Resolved since last review (1)

Comment thread src/otomi-stack.ts Outdated
Comment thread src/otomi-stack.ts Outdated
Copilot AI balanced review requested due to automatic review settings October 1, 2026 08:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Catalogs stored in memory can omit the required status field after creation or editing.

Review effort: Balanced
Findings: 2 High severity

Open (2)
Resolved since last review (1)

Comment thread src/otomi-stack.ts Outdated
Copilot AI balanced review requested due to automatic review settings October 1, 2026 08:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Catalog collection responses can omit required status data, and the prior repository-host classification concern remains unresolved.

Review effort: Balanced
Findings: 2 High severity

Open (2)

Copilot AI balanced review requested due to automatic review settings October 1, 2026 09:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The previously identified repository-host substring check remains unresolved.

Review effort: Balanced
Findings: None

Resolved since last review (2)

Copilot AI balanced review requested due to automatic review settings October 1, 2026 12:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Migration back to the internal Git server can leave its application disabled.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

Comment thread src/otomi-stack.ts
Copilot AI balanced review requested due to automatic review settings October 1, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

External-repository detection still uses unsafe substring matching, leaving the existing correctness issue unresolved.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

Copilot AI balanced review requested due to automatic review settings October 1, 2026 14:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The unresolved substring hostname check can misclassify external repositories and leave git-server enabled.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

@CasLubbers
CasLubbers merged commit 44106cf into main Oct 1, 2026
9 checks passed
@CasLubbers
CasLubbers deleted the APL-2194 branch October 1, 2026 14:29
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.

4 participants