MCPcopy Index your code
hub / github.com/github/spec-kit / _record_result

Method _record_result

src/specify_cli/workflows/engine.py:781–794  ·  view source on GitHub ↗

Record a step result into both the live context and persistent state. ``record_step_result`` writes ``state.step_results`` under the run lock. On a resume run ``context.steps`` *is* that same dict, so that locked write is the only one needed; mirror into ``context.steps`` se

(
        context: StepContext, state: RunState, step_id: str, data: dict[str, Any]
    )

Source from the content-addressed store, hash-verified

779
780 @staticmethod
781 def _record_result(
782 context: StepContext, state: RunState, step_id: str, data: dict[str, Any]
783 ) -> None:
784 """Record a step result into both the live context and persistent state.
785
786 ``record_step_result`` writes ``state.step_results`` under the run lock.
787 On a resume run ``context.steps`` *is* that same dict, so that locked
788 write is the only one needed; mirror into ``context.steps`` separately
789 only when it is a distinct object (a fresh run), to avoid an unlocked
790 mutation of the shared dict that could race a concurrent ``save()``.
791 """
792 if context.steps is not state.step_results:
793 context.steps[step_id] = data
794 state.record_step_result(step_id, data)
795
796 def _execute_steps(
797 self,

Callers 1

_execute_stepsMethod · 0.95

Calls 1

record_step_resultMethod · 0.80

Tested by

no test coverage detected