A package profile stored by an older host is unreadable ("profile.(fields) = 17 of 18") after the host adds a trait; the builtin silently stands and the next pass costs a spurious full re-resolve #339

Closed
opened 2026-10-08 17:37:12 +02:00 by buildagent · 1 comment
Member

This was found while working on #334, from zammad-dev's daemon.log and confirmed in the reproduction.

Observed

After upgrading from 0.33.1 to 0.34.0, both the migration and the promotion log:

declared profile not readable by this build; the builtin answer stands lang="de.h-dv.ruby/ruby" refusal=profile.(fields) = "17 of 18"

Cause

  • 0.33.1 stored the package's declared Ruby profile in the index with 17 fields.
  • 0.34.0 added the lexical_constant_lookup trait (#326), and its decoder requires exactly 18 fields.
  • So the stored profile is refused and the builtin profile is used instead.

Consequences

  • Package overrides are ignored. For the migration and promotion passes, any profile overrides the package declares are silently dropped. For Ruby today the builtin happens to agree.
  • A spurious full re-resolve. The next ordinary pass rewrites the profile with 18 fields and sees a "change" (the capability/bridge grant moved… with capabilities_moved=false bridges_moved=false). That costs one unneeded Full re-resolve, about 1 min on Zammad.
  • It will recur. Every future trait addition repeats this for every package-owned project.

Proposed fix

  • Decode missing trailing trait fields as the extends profile's defaults, so a profile written by an older host stays readable.
  • Compare DECODED profiles, not their stored strings, when deciding whether the profile moved.
  • Test: a profile stored with N−1 fields decodes, and re-recording it is not a change.
This was found while working on #334, from zammad-dev's daemon.log and confirmed in the reproduction. ## Observed After upgrading from 0.33.1 to 0.34.0, both the migration and the promotion log: `declared profile not readable by this build; the builtin answer stands lang="de.h-dv.ruby/ruby" refusal=profile.(fields) = "17 of 18"` ## Cause - 0.33.1 stored the package's declared Ruby profile in the index with 17 fields. - 0.34.0 added the `lexical_constant_lookup` trait (#326), and its decoder requires exactly 18 fields. - So the stored profile is refused and the builtin profile is used instead. ## Consequences - **Package overrides are ignored.** For the migration and promotion passes, any profile overrides the package declares are silently dropped. For Ruby today the builtin happens to agree. - **A spurious full re-resolve.** The next ordinary pass rewrites the profile with 18 fields and sees a "change" (`the capability/bridge grant moved…` with `capabilities_moved=false bridges_moved=false`). That costs one unneeded Full re-resolve, about 1 min on Zammad. - **It will recur.** Every future trait addition repeats this for every package-owned project. ## Proposed fix - Decode missing trailing trait fields as the `extends` profile's defaults, so a profile written by an older host stays readable. - Compare DECODED profiles, not their stored strings, when deciding whether the profile moved. - Test: a profile stored with N−1 fields decodes, and re-recording it is not a change.
Author
Member

Released in v0.35.0 (https://git.h-dv.de/h-dv/code-index/releases/tag/v0.35.0), via PR #351.

A package profile stored by an older host now decodes over its extends profile instead of being refused.

When a newer host re-records it, the profiles are compared decoded rather than as strings. A row that only gained new default fields therefore no longer counts as a move, and no longer triggers an extra full re-resolve.

Released in v0.35.0 (https://git.h-dv.de/h-dv/code-index/releases/tag/v0.35.0), via PR #351. A package profile stored by an older host now decodes over its `extends` profile instead of being refused. When a newer host re-records it, the profiles are compared decoded rather than as strings. A row that only gained new default fields therefore no longer counts as a move, and no longer triggers an extra full re-resolve.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index#339
No description provided.