git-world-reads.ts 789 B

123456789101112131415161718
  1. // git.* world reads feeding one ask: four source nodes, one sink. The point of this
  2. // fixture next to grep-fanout is the OTHER container — and that the top-level log call in
  3. // the middle stays chatter while the git container's log member is a site (the collision
  4. // the registry keys around).
  5. const changed = await git.changedFiles();
  6. log(`changed: ${changed.length}`);
  7. const commits = await git.log(5);
  8. const status = await git.status();
  9. const diff = await git.diff("HEAD");
  10. const reviewer = agent("reviewer");
  11. const summary = await reviewer.ask<string>(
  12. `Branch ${status.branch ?? "detached"} (clean=${status.clean}).\n` +
  13. `Changed: ${changed.join(", ")}\n` +
  14. `Recent: ${commits.map((c) => c.subject).join(" | ")}\n` +
  15. `Diff size: ${diff.length}`,
  16. );
  17. return summary;