MCPcopy Index your code
hub / github.com/Codeplain-ai/codeplain / ensure_previous_frid_commits_exist

Method ensure_previous_frid_commits_exist

plain_modules.py:284–310  ·  view source on GitHub ↗

Ensure that all FRID commits before the render_range exist. This is a precondition check that must pass before rendering can proceed. Raises an exception if any previous FRID commits are missing. Args: render_range: List of FRIDs to render r

(self, render_range: list[str], render_conformance_tests: bool)

Source from the content-addressed store, hash-verified

282 )
283
284 def ensure_previous_frid_commits_exist(self, render_range: list[str], render_conformance_tests: bool) -> None:
285 """
286 Ensure that all FRID commits before the render_range exist.
287
288 This is a precondition check that must pass before rendering can proceed.
289 Raises an exception if any previous FRID commits are missing.
290
291 Args:
292 render_range: List of FRIDs to render
293 render_conformance_tests: Whether to check for conformance tests
294
295 Raises:
296 MissingPreviousFridCommitsError: If any previous FRID commits are missing
297 """
298 first_render_frid = render_range[0]
299
300 # Get all FRIDs that should have been rendered before this one
301 previous_frids = plain_spec.get_frids_before(self.plain_source, first_render_frid)
302 if not previous_frids:
303 return
304
305 # Ensure the module folders exist
306 self._ensure_module_folders_exist(first_render_frid, render_conformance_tests)
307
308 # Verify commits exist for all previous FRIDs
309 for prev_frid in previous_frids:
310 self._ensure_frid_commit_exists(prev_frid, first_render_frid, render_conformance_tests)
311
312 def get_required_module_by_name(self, module_name: str) -> PlainModule:
313 for module in self.all_required_modules:

Callers 1

_render_moduleMethod · 0.80

Tested by

no test coverage detected