MCPcopy Create free account
hub / github.com/EvoMap/evolver / recordPR

Function recordPR

src/gep/selfPR.js:187–196  ·  view source on GitHub ↗
(diffHash)

Source from the content-addressed store, hash-verified

185}
186
187function recordPR(diffHash) {
188 const state = readState();
189 let recent = Array.isArray(state.recentDiffHashes) ? state.recentDiffHashes : [];
190 recent.push(diffHash);
191 if (recent.length > 20) recent = recent.slice(-20);
192 writeState({
193 lastPRAt: new Date().toISOString(),
194 recentDiffHashes: recent,
195 });
196}
197
198function buildPRBody({ capsule, mutation, gene, blastRadius }) {
199 const score = capsule && capsule.outcome ? capsule.outcome.score : 0;

Callers 1

maybeCreatePRFunction · 0.85

Calls 2

readStateFunction · 0.70
writeStateFunction · 0.70

Tested by

no test coverage detected