Skip to content

feat: Skip dependants of skipped changes - #2455

Merged
taratatach merged 1 commit into
masterfrom
feat/skip-dependants-of-skipped-changes
Jul 17, 2026
Merged

feat: Skip dependants of skipped changes#2455
taratatach merged 1 commit into
masterfrom
feat/skip-dependants-of-skipped-changes

Conversation

@taratatach

@taratatach taratatach commented Jul 7, 2026

Copy link
Copy Markdown
Member

A skipped change left its dependants unprotected: on the next cycle
they would be attempted and either fail spuriously (e.g.
MISSING_PARENT) or, worse, succeed partially and create an
orphan. The multi-error loop makes this more visible since
dependants are no longer shielded by the first-failure break.

When a change is skipped (automatically via handleSyncError
returning 'skipped', or by the user), the syncBatch loop now
adds it to blockedIds. Dependents detected via
directPrerequisites whose prereq has doc.skipped === true are
themselves skipped (skipChange persists the flag) and emit a
synthetic SKIPPED_DEPENDENCY alert. blockedIds propagates
the skip transitively across the topologically ordered batch.

The synthetic SyncError carries prereqPath as a dedicated
field, transported by makeAlert to the GUI. viewByCode
interpolates it into a localized message with the path wrapped
in backticks. The restored Util.DecorationParser parses those
backticks in alertContent, and decoratedName renders the path
as a clickable chip (blue background, title with full path,
ShowInParent on click).

Fixes #2436

Please make sure the following boxes are checked:

  • PR is not too big
  • it improves UX & DX in some way
  • it includes unit tests matching the implementation changes
  • it includes scenarios matching a new behaviour or has been manually tested
  • it includes relevant documentation

@taratatach
taratatach requested a review from shepilov July 7, 2026 14:47
@taratatach taratatach self-assigned this Jul 7, 2026
@taratatach
taratatach force-pushed the feat/skip-dependants-of-skipped-changes branch from 02a5991 to 494b634 Compare July 7, 2026 14:48
Comment thread core/metadata.js
@taratatach
taratatach force-pushed the feat/skip-dependants-of-skipped-changes branch from 494b634 to ca7916b Compare July 16, 2026 14:06
  A skipped change left its dependants unprotected: on the next cycle
  they would be attempted and either fail spuriously (e.g.
  `MISSING_PARENT`) or, worse, succeed partially and create an
  orphan. The multi-error loop makes this more visible since
  dependants are no longer shielded by the first-failure break.

  When a change is skipped (automatically via `handleSyncError`
  returning `'skipped'`, or by the user), the `syncBatch` loop now
  adds it to `blockedIds`. Dependents detected via
  `directPrerequisites` whose prereq has `doc.skipped === true` are
  themselves skipped (`skipChange` persists the flag) and emit a
  synthetic `SKIPPED_DEPENDENCY` alert. `blockedIds` propagates
  the skip transitively across the topologically ordered batch.

  The synthetic `SyncError` carries `prereqPath` as a dedicated
  field, transported by `makeAlert` to the GUI. `viewByCode`
  interpolates it into a localized message with the path wrapped
  in backticks. The restored `Util.DecorationParser` parses those
  backticks in `alertContent`, and `decoratedName` renders the path
  as a clickable chip (blue background, `title` with full path,
  `ShowInParent` on click).
@taratatach
taratatach force-pushed the feat/skip-dependants-of-skipped-changes branch from ca7916b to d67c1e2 Compare July 16, 2026 15:03
@taratatach
taratatach merged commit 53dc935 into master Jul 17, 2026
16 of 17 checks passed
@taratatach
taratatach deleted the feat/skip-dependants-of-skipped-changes branch July 17, 2026 07:53
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.

Alert user when changes are skipped during sync

2 participants