Skip to content

refactor(updater): Persist key-scoped fetched edition hints and remove legacy jar UOM dead code#1082

Merged
leumor merged 7 commits intorelease/2from
bugfix/updater-edition-probing-opt
Mar 2, 2026
Merged

refactor(updater): Persist key-scoped fetched edition hints and remove legacy jar UOM dead code#1082
leumor merged 7 commits intorelease/2from
bugfix/updater-edition-probing-opt

Conversation

@leumor
Copy link
Collaborator

@leumor leumor commented Mar 1, 2026

Summary

  • persist a key-scoped lastKnownGoodFetchedEdition hint in node.updater
  • compute updater subscribe seed as max(currentBuild, lastKnownGoodFetchedEdition) when the persisted key matches the active update key
  • reset stale hints when the update key changes and ignore successful fetch reports from non-current keys
  • remove legacy main-jar UOM dispatch and dead main-jar/dependency-inbound handling paths
  • keep UOM behavior revocation-focused while preserving dependency fetch fallback from announced peers
  • clean up obsolete updater constants/methods and update/add focused updater tests

How To Test

  • ./gradlew test --tests network.crypta.node.updater.NodeUpdateManagerTest
  • ./gradlew test --tests network.crypta.node.updater.UpdateOverMandatoryManagerTest
  • ./gradlew test --tests network.crypta.node.updater.NodeUpdaterTest
  • ./gradlew test --tests network.crypta.node.NodeControlMessageHandlerTest

Notes

  • base branch remains release/2 per request.

Store the last known-good fetched core info edition in node.updater and scope it to the active update key so stale hints are ignored after key changes.

Seed core updater subscription from max(currentBuild, lastKnownGoodFetchedEdition) and reset hints when the configured update key changes.

Also keep key-only URI compatibility tests and add focused tests for seed selection, key mismatch reset, and fetch recording behavior.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52430f914c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

leumor added 2 commits March 1, 2026 09:53
Add a null/empty guard in NodeUpdateManager.extractPublicKeyMaterial() before indexOf calls to avoid potential NullPointerException on malformed URI string rendering.

Also replace duplicated revocation option literals with REVOCATION_URI_OPTION and rename a shadowing local test variable in NodeUpdateManagerTest.
Keep full configured revocation URIs when they use a custom docname/path, while still serializing bare key material for the canonical /revoked form.

Add regression tests to ensure callback/config round-trips do not rewrite custom revocation URI locations.
@leumor
Copy link
Collaborator Author

leumor commented Mar 1, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24ff0d7bd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Drop disabled main-jar UOM message handling and dead manager code paths, including unused legacy constants/callbacks in NodeUpdateManager.

Remove unused inbound dependency handler state and simplify UOM dependency peer selection to announcement-derived peers.

Update updater tests for new behavior and eliminate stale/unused test warnings.
@leumor leumor changed the title fix(updater): Persist key-scoped fetched edition hints refactor(updater): remove legacy jar UOM dead code Mar 1, 2026
@leumor leumor changed the title refactor(updater): remove legacy jar UOM dead code refactor(updater): Persist key-scoped fetched edition hints and remove legacy jar UOM dead code Mar 1, 2026
@leumor
Copy link
Collaborator Author

leumor commented Mar 1, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51bd6fd723

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Keep full update URI values when a non-default docname/path is configured so restart does not silently switch channels.

Continue serializing canonical info/jar updater URIs as bare key material, and add regression tests for callback and constructor persistence behavior.
@leumor
Copy link
Collaborator Author

leumor commented Mar 1, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ea6e9d25e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Scope persisted fetched-edition hints by normalized update URI instead of key-only values, canonicalizing SSK-for-USK fetch URIs before comparison.

Reset ambiguous legacy bare-key hints when migrating to custom update doc scopes, preserve safe legacy-info migration, and keep startup subscription aligned to configured update URI.

Add focused updater tests for custom-scope migration, SSK success-path normalization, and same-key different-doc behavior; extract test setup helper and simplify scope-alignment control flow.
@leumor
Copy link
Collaborator Author

leumor commented Mar 1, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e43488bc3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

When a matching fetched-edition hint exists, subscribe one edition below the highest known fetched value to ensure USKManager emits immediate onFoundEdition callbacks after restart.

Keep current-build seeding for non-matching or near-current hints, and extend updater tests for higher-than-current and one-above-current seed behavior.
@leumor
Copy link
Collaborator Author

leumor commented Mar 1, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
71.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@leumor leumor merged commit 03a250c into release/2 Mar 2, 2026
3 of 4 checks passed
@leumor leumor deleted the bugfix/updater-edition-probing-opt branch March 2, 2026 04:22
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.

1 participant