Skip to content

Display observed source repository archive state - #17

Open
boylejj wants to merge 3 commits into
mainfrom
boylejj-archive-state-display
Open

boylejj wants to merge 3 commits into
mainfrom
boylejj-archive-state-display

Conversation

@boylejj

@boylejj boylejj commented Sep 17, 2026

Copy link
Copy Markdown

Summary

Correct the source repository status wording in migration status, migration watch, and TUI details. These views now display the reported archive state instead of describing the source repository as locked or unlocked.

Tracking issue: github/migrations-vnext#7129

Changes

  • Read archive state from the existing migration status response and use shared rendering across the three views.
  • Display Source repository archived, Source repository not archived, or Source repository archive state unavailable, depending on the available data.
  • Treat missing archive information, including responses from older servers, as unavailable rather than inferring a value from migration progress.
  • Preserve raw --json output and existing migration and refresh behavior. No additional API requests are introduced.

Lint-related changes

The lint job previously failed during action resolution, before checking Go code.

  • Remove the unavailable proxy setup step and its now-unused OIDC write permission; restore standard Go caching. The existing make lint command and repository-wide lint configuration are unchanged.
  • Use fatal require assertions for prerequisite error checks, preventing misleading follow-on assertions after an unexpected result.
  • Preserve expected rendering output while splitting multi-line fixture strings and adding two line-local dupword suppressions. The repeated Source text is intentional: a section heading is followed by a Source repository ... line, not duplicate prose. The rule remains enabled elsewhere.

Validation

Focused unit tests and built-CLI integration tests passed using local HTTP fixtures. Coverage includes archive-state decoding and display, missing data, refresh behavior, and JSON preservation.

boylejj and others added 2 commits September 17, 2026 13:00
Render the nullable source archive observation in migration status, TUI details, and watch independently of target progress. Preserve raw JSON and existing lifecycle and refresh behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Decode migration.source_repository_archived and render unavailable when migration metadata or the observation is missing. Update status, watch, TUI, and raw-response fixtures without changing migration progress or refresh behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: jeffsaracco <248182+jeffsaracco@users.noreply.github.com>
Copilot AI requested a review from jeffsaracco September 18, 2026 13:50
@boylejj
boylejj marked this pull request as ready for review September 18, 2026 16:09
@boylejj
boylejj requested a review from a team as a code owner September 18, 2026 16:09
Copilot AI balanced review requested due to automatic review settings September 18, 2026 16:09

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The implementation consistently handles true, false, missing, invalid, and refreshed archive observations without altering raw JSON behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Displays the API-reported source repository archive state consistently across migration status, watch, and TUI views.

Changes:

  • Adds nullable archive-state decoding and shared rendering.
  • Removes misleading lock-state output while preserving JSON.
  • Expands tests and repairs lint workflow configuration.
File Description
README.md Documents archive-state semantics.
.github/​workflows/​lint.yaml Simplifies permissions and restores caching.
internal/​elmapi/​migrations.go Decodes the archive-state field.
internal/​elmapi/​migrations_test.go Tests decoding and invalid values.
internal/​render/​migration.go Adds shared archive-state rendering.
internal/​render/​migration_test.go Tests rendering and independence from progress.
internal/​cmd/​migration/​migration_test.go Tests status and JSON behavior.
internal/​cmd/​migration/​watch/​view.go Displays archive state in watch output.
internal/​cmd/​migration/​watch/​watch_test.go Tests watch display and refreshes.
internal/​tui/​model_test.go Tests TUI display and refreshes.
integration/​cli_test.go Adds end-to-end status coverage.

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

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