Skip to content

fix(static-loader): retire SectionTeacher rows when source relation set is empty #477

Description

@tiankaima

Problem

writeSectionTeachers clears the implicit _SectionTeachers relation for imported Sections, but returns early when the newly resolved relation set is globally empty. In that case existing explicit SectionTeacher rows remain active even though the current static snapshot contains no corresponding relationships.

This can leave the explicit comment target/status model inconsistent with the rebuilt implicit relation.

Expected behavior

  • an empty current relation set still clears implicit links for the imported Section scope
  • active explicit SectionTeacher rows absent from the rebuilt relation are marked retired, not deleted
  • comments/history attached to those rows remain preserved
  • non-empty reconciliation and reactivation behavior remain unchanged

Acceptance criteria

  • regression coverage proves the empty-set branch executes both implicit deletion and explicit retirement
  • integration/static import suites remain green

Fixed by #478.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions