Skip to content

Partial rendering with spec change detection#221

Merged
pedjaradenkovic merged 1 commit into
mainfrom
feat/automatic-partial-rendering
Jun 19, 2026
Merged

Partial rendering with spec change detection#221
pedjaradenkovic merged 1 commit into
mainfrom
feat/automatic-partial-rendering

Conversation

@NejcS

@NejcS NejcS commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Replace the coarse "spec changed -> re-render the whole affected module"
behavior with functionality-level change detection. On re-render, each module's
current functional specs are diffed against the set rendered last time and
classified (added / removed / edited / moved); rendering resumes from the
earliest affected functionality, keeping the unchanged prefix instead of
rebuilding from scratch.

  • Persist the rendered functionality list per module in
    .codeplain/module_metadata.json, committed per-FRID so an interrupted render
    still has an accurate baseline (storing raw FR markdown so code-variable FRs
    are not falsely flagged as edited).
  • change_detection.py computes the earliest affected FRID; non-functional
    changes (definitions, impl reqs) and missing baselines fall back to a full
    re-render.
  • get_render_choices offers the optimized "render from changed functionality"
    as the default, alongside full-rebuild and reset options; a functionality
    appended past the render frontier is treated as a normal continue.
  • TUI defaults to the fastest (least-work) choice. Remove the obsolete --smart
    flag.

Backward compatible: builds without the new metadata fall back to a full
re-render. Covered by tests in test_change_detection.py, test_partial_rendering.py,
and test_plain_modules.py.

Comment thread render_machine/actions/finish_functional_requirement.py Outdated
Comment thread tui/plain_module_render_choice_tui.py
Comment thread tui/plain_module_render_choice_tui.py
Comment thread plain_modules.py Outdated
Comment thread change_detection.py
@NejcS NejcS requested a review from zanjonke June 15, 2026 10:10
@NejcS NejcS self-assigned this Jun 15, 2026
@NejcS

NejcS commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

@kaja-s I took the liberty of making some TUI design decisions. What do you think of the example screenshot above?

@NejcS NejcS force-pushed the feat/automatic-partial-rendering branch from 41417a7 to b091fc3 Compare June 15, 2026 10:18
@dusano

dusano commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

"Render from functionality 6..." > "Render from changed functionality 6..."

Mogoče to bolje skomunicira zakaj obstaja ta možnost.

@zanjonke zanjonke added the enhancement New feature or request label Jun 15, 2026
Replace the coarse "spec changed -> re-render the whole affected module"
behavior with functionality-level change detection. On re-render, each module's
current functional specs are diffed against the set rendered last time and
classified (added / removed / edited / moved); rendering resumes from the
earliest affected functionality, keeping the unchanged prefix instead of
rebuilding from scratch.

- Persist the rendered functionality list per module in
  .codeplain/module_metadata.json, committed per-FRID so an interrupted render
  still has an accurate baseline (storing raw FR markdown so code-variable FRs
  are not falsely flagged as edited).
- change_detection.py computes the earliest affected FRID; non-functional
  changes (definitions, impl reqs) and missing baselines fall back to a full
  re-render.
- get_render_choices offers the optimized "render from changed functionality"
  as the default, alongside full-rebuild and reset options; a functionality
  appended past the render frontier is treated as a normal continue.
- TUI defaults to the fastest (least-work) choice. Remove the obsolete --smart
  flag.

Backward compatible: builds without the new metadata fall back to a full
re-render. Covered by tests in test_change_detection.py, test_partial_rendering.py,
and test_plain_modules.py.
@pedjaradenkovic pedjaradenkovic force-pushed the feat/automatic-partial-rendering branch from 63fad66 to 805fa1e Compare June 19, 2026 13:24
@pedjaradenkovic pedjaradenkovic marked this pull request as ready for review June 19, 2026 13:25
@pedjaradenkovic pedjaradenkovic merged commit dc7d352 into main Jun 19, 2026
10 checks passed
@pedjaradenkovic pedjaradenkovic deleted the feat/automatic-partial-rendering branch June 19, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants