spill 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/spill/briefs.rb +6 -4
- data/lib/spill/collectors/local_git.rb +9 -2
- data/lib/spill/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6fdd902675c2ffbe157716d00abe7e93d7dc4baee1a326b3eda70b1ad644a04
|
|
4
|
+
data.tar.gz: 613d93aa6ea3ed459a63f399e5e40dbd30dbb2e34f1fcea8be099e0a57e09fa0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 65bddb5fa09e60ea45b901c96220519066eb7e989d559cf3f122b75f1e80cce6226835b9f020f409f533b6fcac03c22e64471c734feb0c55e40d42d964fd4dd8
|
|
7
|
+
data.tar.gz: 7c30a22113d054e0ebf40650036e7ca5412eea1f5a96c51e2683028f505aabe4f0714e40e5cf3a1e7ecb36933352649d490db4e9fd9c54dfe903ad682821646d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.5.1] - 2026-07-11
|
|
4
|
+
|
|
5
|
+
- The fact-block cap now keeps the newest facts: on a repo busy enough to
|
|
6
|
+
overflow the block (roughly 40+ commits in the window), it used to keep the
|
|
7
|
+
oldest commits and silently drop the newest ones and every GitHub fact
|
|
8
|
+
(merged PRs included) from the AI summary.
|
|
9
|
+
- Repos using git's SHA-256 object format collect commits again — the commit
|
|
10
|
+
parser rejected 64-character hashes, so those repos showed up as quiet.
|
|
11
|
+
- A commit log record with an unparseable date is now skipped on its own;
|
|
12
|
+
previously it could error out the whole report.
|
|
13
|
+
|
|
3
14
|
## [0.5.0] - 2026-07-11
|
|
4
15
|
|
|
5
16
|
- Each key point may now run to three sentences (120-token cap) — enough for
|
data/lib/spill/briefs.rb
CHANGED
|
@@ -18,7 +18,9 @@ module Spill
|
|
|
18
18
|
}.freeze
|
|
19
19
|
|
|
20
20
|
# The on-device model has a small context window; a block that outgrows
|
|
21
|
-
# this budget keeps
|
|
21
|
+
# this budget keeps the facts at the end of the list — the newest
|
|
22
|
+
# commits and all the GitHub facts, which follow them — and says how
|
|
23
|
+
# many earlier ones were cut.
|
|
22
24
|
MAX_BODY_CHARS = 140
|
|
23
25
|
MAX_BLOCK_CHARS = 3000
|
|
24
26
|
|
|
@@ -56,10 +58,10 @@ module Spill
|
|
|
56
58
|
|
|
57
59
|
def capped(facts)
|
|
58
60
|
budget = MAX_BLOCK_CHARS
|
|
59
|
-
kept = facts.take_while { |fact| (budget -= fact.length + 1) >= 0 }
|
|
60
|
-
kept = facts.
|
|
61
|
+
kept = facts.reverse.take_while { |fact| (budget -= fact.length + 1) >= 0 }.reverse
|
|
62
|
+
kept = facts.last(1) if kept.empty?
|
|
61
63
|
cut = facts.size - kept.size
|
|
62
|
-
cut.positive? ?
|
|
64
|
+
cut.positive? ? [ "(and #{cut} earlier items not listed)" ] + kept : kept
|
|
63
65
|
end
|
|
64
66
|
|
|
65
67
|
# A PR that was opened in the window but is still open would appear
|
|
@@ -37,12 +37,19 @@ module Spill
|
|
|
37
37
|
|
|
38
38
|
log.split(RECORD_SEP).filter_map do |record|
|
|
39
39
|
sha, date, subject, body = record.strip.split(SEP, 4)
|
|
40
|
-
|
|
40
|
+
# SHA-1 or SHA-256 repos; a body containing our separators makes
|
|
41
|
+
# a malformed record, not a forged commit — skip, never raise.
|
|
42
|
+
next unless sha&.match?(/\A(?:\h{40}|\h{64})\z/)
|
|
41
43
|
next if seen[sha]
|
|
42
44
|
|
|
45
|
+
timestamp = begin
|
|
46
|
+
Time.parse(date)
|
|
47
|
+
rescue ArgumentError, TypeError
|
|
48
|
+
next
|
|
49
|
+
end
|
|
43
50
|
seen[sha] = true
|
|
44
51
|
Event.new(source: :local_git, kind: :commit, repo: name, title: subject,
|
|
45
|
-
ref: branch, timestamp:
|
|
52
|
+
ref: branch, timestamp: timestamp,
|
|
46
53
|
extra: { sha: sha, body: clean_body(body) })
|
|
47
54
|
end
|
|
48
55
|
end
|
data/lib/spill/version.rb
CHANGED