Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
db58e1a
πŸ› fix(automerge): verify action-sha pins resolve upstream before the …
hivecommons-hive[bot] Nov 3, 2026
19f60c6
fix(matrix): keep freshness HUD and kiosk CTA above the terminal effe…
clubanderson Nov 3, 2026
f514b0d
πŸ› fix(advisory): re-pin digest past foreign-authored comment, warn on…
clubanderson Nov 3, 2026
a5ce8fc
πŸ› fix(relay): paste oversized task prompts through tmux load-buffer a…
hivecommons-hive[bot] Nov 3, 2026
af4ad99
πŸ› stream: deeper capture queue, wallclock PTS and a stall watchdog fo…
clubanderson Nov 3, 2026
b4fd659
πŸ› Edit claim ledger, needs-decision and sentinel comments in place; s…
clubanderson Nov 3, 2026
8049c14
πŸ› fix(config): warn, report and optionally refuse when a seed boot dr…
clubanderson Nov 3, 2026
edcb058
test(crux/api): cover the lane client wire paths in-package (#16455)
hivecommons-hive[bot] Nov 3, 2026
55318dc
🌱 chore(actions): surface status-card helper failures and add its reg…
hivecommons-hive[bot] Nov 3, 2026
abf91a8
πŸ› Restore activity monitor layout and compact chevrons (#16454)
clubanderson Nov 3, 2026
6b9d9cf
✨ perf: progressively load the dashboard shell and live panels (#16457)
clubanderson Nov 3, 2026
0198104
πŸ“– docs: fix namespace identity label keys in manual-provisioning.md (…
hivecommons-hive[bot] Nov 3, 2026
b80e424
πŸ› Wait for dashboard paint and dismiss prior fixture overlays (#16461)
clubanderson Nov 3, 2026
6a6d1d3
πŸ› Size activity chevrons to their captions and render CI/Review lanes…
clubanderson Nov 3, 2026
ed048ec
πŸ› fix(ci): report unavailable DCO enumeration without weakening admis…
thatguywob Nov 3, 2026
b4896cf
chore(ci): relocate DCO provider runbook and name its policy literals…
hivecommons-hive[bot] Nov 3, 2026
9a39087
πŸ› Drop cross-row chevron height assertion from geometry probe (#16471)
clubanderson Nov 3, 2026
f5a3200
🌱 logscrub: align v5 scrubber categories with v6 (#16470)
hivecommons-hive[bot] Nov 3, 2026
d5013b7
πŸ› dashboard: distinct glyphs for CI and review tracker stages (#16473)
clubanderson Nov 3, 2026
887d429
πŸ› dashboard: plain-language CI track captions with tooltip detail (#1…
clubanderson Nov 4, 2026
5a73e1e
πŸ› adoption: operator Adopt now takes over any PR, owners included (#1…
clubanderson Nov 4, 2026
771862c
πŸ› dashboard: CI/Review chevrons always carry a state word and name th…
clubanderson Nov 4, 2026
b1bb2ee
πŸ› dashboard: show a decomposed parent waiting on children as Tracking…
clubanderson Nov 4, 2026
673f43e
πŸ› dashboard: remove gap between tracker info line and stage chevrons …
clubanderson Nov 4, 2026
9754607
πŸ› dashboard: CI/Review chevrons show pass/total and perspectives done…
clubanderson Nov 4, 2026
a6fc111
πŸ› fix(inference): log why unidentified translator callers are refused…
hivecommons-hive[bot] Nov 4, 2026
f082182
🌱 ci: route FOSSA uploads to the CNCF Hive Commons team (#16491)
clubanderson Nov 4, 2026
008ca21
docs: restore FOSSA license-scan badge (#16497)
clubanderson Nov 4, 2026
22051ec
πŸ› fix(contribute): classify assignment close race as expected teardow…
thatguywob Nov 4, 2026
9182901
πŸ› fix: bound heartbeat collectors after timeouts (#16508)
thatguywob Nov 4, 2026
1d6516d
πŸ› fix: exclude expected rebase handoffs from fleet reports (#16512)
thatguywob Nov 4, 2026
cd50e6a
πŸ› fix: avoid duplicate selfreports for cached heartbeat fallback (#16…
thatguywob Nov 4, 2026
7ac511d
πŸ› fix: bound cluster health collection within heartbeat budget (#16506)
thatguywob Nov 4, 2026
eb40422
Merge v5 into v6 (top-up 2026-11-03)
clubanderson Nov 4, 2026
3be09fc
Merge v6 tip (6e5f4003f) into the top-up
clubanderson Nov 4, 2026
d61d907
docs: drop duplicated DCO runbook entry after v6-tip merge
clubanderson Nov 4, 2026
4a9bb62
πŸ› fix: keep a covered issue at 040 while the hive still repairs its r…
clubanderson Nov 4, 2026
dcc9147
πŸ› fix(dashboard): evidence-based remediation state on the PR in progr…
clubanderson Nov 4, 2026
718d719
πŸ› fix: drive Activity Monitor CI counts from check webhooks (#16528)
clubanderson Nov 4, 2026
218785a
πŸ› Review chevron: done-style once perspectives finish, verdict word w…
clubanderson Nov 4, 2026
70b7ba3
🌱 test(automerge): pin that a consumed forced adoption drops the adop…
hivecommons-hive[bot] Nov 4, 2026
9b69f5e
πŸ› fix(spoke): classify sibling heartbeat collect-timeout outcome noti…
hivecommons-hive[bot] Nov 4, 2026
425e6b9
πŸ› Activity Monitor: show Let hive decide beside the lead; action pill…
clubanderson Nov 4, 2026
afaa0df
πŸ› Activity Monitor: never more than two lit chevrons; unreported CI i…
clubanderson Nov 4, 2026
10b3459
πŸ› Activity Monitor: keep stage chevrons a one-line band (chevron info…
hivecommons-hive[bot] Nov 4, 2026
24c6a1c
🌱 images: bump claude 2.1.317 -> 2.1.318 (#16558)
clubanderson Nov 4, 2026
b12d7a6
πŸ› fix: route undeliverable fixer kicks to fallback agents (#16541)
thatguywob Nov 4, 2026
aa5cfb0
πŸ› fix(automerge): stop filing merge-guard base-refresh skips as uncla…
hivecommons-hive[bot] Nov 4, 2026
d6c434f
πŸ› Activity Monitor: a 071/072 row with a pushed or checking head keep…
hivecommons-hive[bot] Nov 4, 2026
7060ac6
test(automerge): fold supersede-label assertion into TestAdoptNowTake…
hivecommons-hive[bot] Nov 4, 2026
2ef949e
πŸ› fix: retry busy CI-failure kicks through a bounded pending queue (#…
thatguywob Nov 4, 2026
2cfe645
πŸ› fix: expose deferred PR fixer queue positions (#16553)
hivecommons-hive[bot] Nov 4, 2026
081de1f
fix(deps): bump transitive body-parser, qs and undici in src/proxy an…
hivecommons-hive[bot] Nov 4, 2026
c466601
✨ feat(dashboard): changed-paragraph reader kiosk view (part 1/3) (#1…
hivecommons-hive[bot] Nov 4, 2026
cdb15d7
🌱 build(deps): bump js-yaml from 4.3.2 to 5.5.0 in /discord (#16566)
dependabot[bot] Nov 4, 2026
0414cba
πŸ› fix(kubejob): delete completed Jobs on a live context when the call…
hivecommons-hive[bot] Nov 4, 2026
33d2917
✨ feat(dashboard): feed published checkpoint diff regions to Code act…
hivecommons-hive[bot] Nov 4, 2026
e6cea67
🌱 build(deps): bump ws from 8.22.0 to 8.22.1 in /dashboard (#16565)
dependabot[bot] Nov 4, 2026
c368a5d
🌱 refactor: share review queue repository qualification (#16571)
thatguywob Nov 4, 2026
1e3ae3c
🌱 build(deps): bump discord.js from 14.27.0 to 14.28.0 in /discord (#…
dependabot[bot] Nov 4, 2026
1b8ef91
🌱 chore: gofmt kubejob test fakeAPI fields (#16575)
mendezr Nov 4, 2026
7ef7d62
πŸ› fix(dashboard): render reader context lines in a neutral color (#16…
thatguywob Nov 4, 2026
757ffe8
πŸ› fix: avoid empty reader catch-up pulls for filtered lines (#16576)
hivecommons-hive[bot] Nov 4, 2026
5f61ffd
πŸ“– docs: explain matrix no-store header in auth middleware (#16574)
mendezr Nov 4, 2026
cf89fbc
Merge remote-tracking branch 'origin/v6' into v6-topup-20261103
clubanderson Nov 4, 2026
2940830
test(github): sentinel carry-over tests expect the rewritten one-comm…
clubanderson Nov 4, 2026
7879a51
Merge remote-tracking branch 'origin/v5' into v6-topup-20261103 (top-…
clubanderson Nov 4, 2026
4fc4ff1
πŸ› Activity Monitor: say whose sign-off a parked review needs and lead…
clubanderson Nov 4, 2026
3536590
πŸ› fix(ci): analyze FOSSA diff baseline before policy test (#16572)
thatguywob Nov 4, 2026
d42ec31
✨ activity: collapse finished CI/Review chevrons to pass/fail icons; …
clubanderson Nov 4, 2026
0eac38d
✨ Hive re-authors its own fixer-exhausted PRs; re-author pill becomes…
clubanderson Nov 4, 2026
4af9ef2
πŸ› fix(dashboard): match viewer handle on a word boundary in sign-off …
hivecommons-hive[bot] Nov 4, 2026
bca042c
test(crux/sandbox): cover Cline provider close/validation edges in Po…
hivecommons-hive[bot] Nov 4, 2026
ad59ff3
test(cmd/hive): fixer fallback tests use a bot-shaped PR author on v6
clubanderson Nov 4, 2026
7e561e9
πŸ› Activity Monitor: person-owed PR steps light PR in progress, not Me…
clubanderson Nov 4, 2026
b47b22f
fix(automerge): reuse stored re-author target before Issues.Get on re…
hivecommons-hive[bot] Nov 4, 2026
63533f1
πŸ› fix(controller): keep approved-direction after a human decision whe…
hivecommons-hive[bot] Nov 4, 2026
d29da0d
πŸ› fix(github): stop un-park sweep re-offering decisions on a held iss…
hivecommons-hive[bot] Nov 4, 2026
a514683
fix(dashboard): keep approved 085 PRs in Merge queue while CI re-runs…
hivecommons-hive[bot] Nov 4, 2026
e60c8e9
πŸ› fix(github): log expected author self-approval verdict refusals at …
hivecommons-hive[bot] Nov 4, 2026
5a7bba3
πŸ› fix(agent-runtime): clear ci_poll_nudge report once the nudge's kic…
hivecommons-hive[bot] Nov 4, 2026
c239bcb
feat(dashboard): replace Matrix presentation with Code activity (#16609)
hivecommons-hive[bot] Nov 4, 2026
ff4b0be
✨ Activity Monitor chevrons: active-with-text / icon-only spec, ring …
clubanderson Nov 4, 2026
404abc1
fix(deploy): open hive-hosted-matrix overlay with view=reader (#16614)
hivecommons-hive[bot] Nov 4, 2026
d50707e
πŸ› dashboard: keep Overview KPI tiles inside the phone viewport after …
clubanderson Nov 4, 2026
b7cc0d0
✨ Auto-decide reviewer scope questions on hive-authored green PRs (#1…
clubanderson Nov 4, 2026
352163f
πŸ› Activity Monitor: state why a human is needed on the row itself (#1…
clubanderson Nov 4, 2026
a9a9094
πŸ“– docs: centralize Code activity compatibility guidance (#16616)
thatguywob Nov 4, 2026
ecd0151
πŸ› Keep a not-yet-run current-phase CI/Review chevron visibly filled (…
clubanderson Nov 4, 2026
5e0e398
πŸ› Activity Monitor: render at most one hive note line per row (#16628)
clubanderson Nov 4, 2026
8f8d67b
Merge remote-tracking branch 'origin/v5' into v6-topup-20261103 (top-…
clubanderson Nov 4, 2026
dc8ccef
πŸ› fix(topup): kept needs-human stays 045 under #16579 engine; restore…
clubanderson Nov 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 37 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# FOSSA CLI configuration for hivecommons/hive.
# Reference: https://github.com/fossas/fossa-cli/blob/master/docs/references/files/fossa-yml.md
version: 3

project:
# Stable project name in the CNCF FOSSA org (the action's `project:` input
# mirrors this so UI and CI agree).
name: hivecommons/hive
# Team NAME in the CNCF FOSSA org (team id 207492). Only applied when the
# project is first created; later changes must be made in the FOSSA UI.
team: Hive Commons
url: https://github.com/hivecommons/hive
link: https://hivecommons.dev

# The Go workspace lives under src/ (src/go.work: root module + src/crux).
# FOSSA auto-discovers every manifest; list the shipped components explicitly
# so a future re-layout does not silently drop one. Shipped: the two Go
# modules, the spoke's runtime Node proxy (src/proxy) and the dashboard.
# Deliberately out of scope as repo tooling, not shipped code:
# discord/package.json and .github/scripts/package.json.
targets:
only:
- type: gomod
path: src
- type: gomod
path: src/crux
- type: npm
path: src/proxy
- type: npm
path: dashboard

paths:
exclude:
- src/test
- src/examples
- examples
- docs
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,17 @@ updates:
open-pull-requests-limit: 10
commit-message:
prefix: "🌱 build(deps)"

# discord/ runs on hosts as hive-discord.service; its lockfile pins
# discord.js's transitive undici, which has needed a hand bump.
- package-ecosystem: "npm"
directory: "/discord"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "no-changelog"
open-pull-requests-limit: 10
commit-message:
prefix: "🌱 build(deps)"
57 changes: 48 additions & 9 deletions .github/scripts/hive-status-card.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
# hive-status-card.sh has REPO NUMBER SECTION exit 0 if the card has a matching section
# hive-status-card.sh upsert REPO NUMBER MARKER BODY_FILE edit the comment carrying MARKER, else create it
#
# Exit status of `has`: 0 = the card carries SECTION, 1 = it does not (or no
# card exists), 3 = the comments could not be read (the API call failed, or
# the response was not a JSON list of comment objects). A caller must treat 3
# as a failure, never as absence: absence makes a workflow post, and posting
# on a read failure is exactly the duplicate this helper exists to prevent.
# `upsert` exits 3 for the same read failure without POSTing or PATCHing;
# a failed PATCH/POST exits non-zero with gh's status. On exit 3 a line
# starting `hive-status-card: error:` is written to stderr.
#
# SECTION matches `<!-- hive:status:section=KEY -->` by exact KEY (e.g.
# `issue-close`, `issue-partial:163`). Only when SECTION ends in `:` is it a
# prefix (e.g. `issue-partial:` matches any `issue-partial:<pr>`), so
Expand All @@ -28,24 +37,53 @@ set -euo pipefail

GH_BIN="${GH_BIN:-gh}"
HIVE_COMMENT_AUTHOR="${HIVE_COMMENT_AUTHOR:-github-actions[bot]}"
READ_ERROR=3

read_error() {
echo "hive-status-card: error: $*" >&2
exit "$READ_ERROR"
}

# Prints the issue's comments as one validated flat JSON array, or exits
# READ_ERROR. Validation happens here so the matchers below never see a shape
# that would make Python exit 1 (which would read as "absent").
comments() {
local raw flat="1"
if [ -n "${HIVE_COMMENTS_FILE:-}" ]; then
cat "$HIVE_COMMENTS_FILE"
return
raw=$(cat "$HIVE_COMMENTS_FILE") || read_error "cannot read HIVE_COMMENTS_FILE ${HIVE_COMMENTS_FILE}"
else
raw=$("$GH_BIN" api --paginate --slurp "repos/$1/issues/$2/comments?per_page=100") ||
read_error "GET repos/$1/issues/$2/comments failed"
flat="0"
fi
"$GH_BIN" api --paginate --slurp "repos/$1/issues/$2/comments?per_page=100" |
python3 -c 'import json,sys
out=[]
for page in json.load(sys.stdin): out.extend(page)
json.dump(out, sys.stdout)'
printf '%s' "$raw" | python3 -c 'import json,sys
flat = sys.argv[1] == "1"
try:
data = json.load(sys.stdin)
except ValueError as e:
sys.exit("response is not JSON: %s" % e)
if not isinstance(data, list):
sys.exit("expected a JSON list, got %s" % type(data).__name__)
pages = [data] if flat else data
out = []
for page in pages:
if not isinstance(page, list):
sys.exit("expected a list of comment pages, got a %s page" % type(page).__name__)
out.extend(page)
for c in out:
if not isinstance(c, dict):
sys.exit("comment is a %s, not an object" % type(c).__name__)
if not isinstance(c.get("user") or {}, dict) or not isinstance(c.get("body") or "", str):
sys.exit("comment %r has a malformed user or body" % c.get("id"))
json.dump(out, sys.stdout)' "$flat" || read_error "comments for $1#$2 could not be parsed"
}

cmd="${1:-}"; repo="${2:-}"; number="${3:-}"
case "$cmd" in
has)
section="${4:?section key required}"
comments "$repo" "$number" | python3 -c 'import json,re,sys
list=$(comments "$repo" "$number")
printf '%s' "$list" | python3 -c 'import json,re,sys
want=sys.argv[1]
section_re=re.compile(r"<!-- hive:status:section=(\S+) -->")
def matches(key):
Expand All @@ -64,7 +102,8 @@ sys.exit(1)' "$section"
;;
upsert)
marker="${4:?marker required}"; body_file="${5:?body file required}"
id=$(comments "$repo" "$number" | python3 -c 'import json,sys
list=$(comments "$repo" "$number")
id=$(printf '%s' "$list" | python3 -c 'import json,sys
marker, author = sys.argv[1], sys.argv[2]
for c in json.load(sys.stdin):
if (c.get("user") or {}).get("login") != author:
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/integration-governance.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const MAX_COMMITS = 1000;
const MAX_AUTHOR_BATCH = 50;
// This literal is inside the enrolled .github closure. A caller-supplied
// preparedBy.sourceSHA must never choose a new executable verifier tree.
const TRUSTED_SCRIPTS_TREE = '1a35ca4f9e5d1c8b7c50e8cc32efe996df5deeb0';
const TRUSTED_SCRIPTS_TREE = 'b3108c5a9ebe25702b15654d9f37a7236f081830';
const SOURCE = 'https://github.com/kubernetes-sigs/kubebuilder-release-tools/tree/012269a88fa4c034a0acf1ba84c26b195c0dbab4';
const sha = value => crypto.createHash('sha256').update(value).digest('hex');
const git = (args, cwd = process.cwd()) =>
Expand Down
164 changes: 164 additions & 0 deletions .github/scripts/test-hive-status-card.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
#!/usr/bin/env bash
# test-hive-status-card.sh β€” exercises .github/scripts/hive-status-card.sh with
# a gh stub so no network calls are made (#16363).
#
# Pins: exact section matching, ordinary behaviour when no card exists, that
# an API or parse failure is reported as an error (exit 3) and never as
# absence, and that `upsert` edits only the posting identity's marker comment.
set -u -o pipefail

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HELPER="${HERE}/hive-status-card.sh"
TMP_ROOT="${HERE}/../.test-tmp"
mkdir -p "$TMP_ROOT"
TMP="$(mktemp -d "$TMP_ROOT/hive-status-card.XXXXXX")"
trap 'rm -rf "$TMP"; rmdir "$TMP_ROOT" 2>/dev/null || true' EXIT

fail=0
pass() { echo " ok: $*"; }
bad() { echo " FAIL: $*"; fail=1; }

CALL_LOG="$TMP/gh-calls.log"
: > "$CALL_LOG"

GH_STUB="$TMP/gh"
cat > "$GH_STUB" <<'STUB'
#!/usr/bin/env bash
set -euo pipefail
method=GET
path=""
prev=""
for arg in "$@"; do
if [ "$prev" = "-X" ]; then method="$arg"; prev=""; continue; fi
if [ "$prev" = "-f" ] || [ "$prev" = "-F" ]; then prev=""; continue; fi
case "$arg" in
-X|-f|-F) prev="$arg" ;;
repos/*) path="$arg" ;;
esac
done
printf '%s %s\n' "$method" "$path" >> "$CALL_LOG"
if [ "$method" != "GET" ]; then
printf '{"id":1}\n'
exit 0
fi
card='{"id":%s,"user":{"login":"hivecommons-hive[bot]","type":"Bot"},"body":"<!-- hive:status -->\\n**Hive status**\\n\\n<!-- hive:status:section=%s -->\\nnote\\n<!-- /hive:status:section -->"}'
case "$path" in
repos/o/r/issues/1/comments*)
printf "[[$card]]\n" 101 issue-close ;;
repos/o/r/issues/2/comments*)
printf "[[$card]]\n" 201 issue-partial:1638 ;;
repos/o/r/issues/3/comments*)
printf '[[{"id":301,"user":{"login":"someone","type":"User"},"body":"plain comment"}],[]]\n' ;;
repos/o/r/issues/4/comments*)
printf '[[{"id":401,"user":{"login":"someone","type":"User"},"body":"quoting:\\n<!-- hive:status -->\\n<!-- hive:status:section=issue-close -->"}]]\n' ;;
repos/o/r/issues/5/comments*)
echo "HTTP 502: Bad Gateway" >&2
exit 1 ;;
repos/o/r/issues/6/comments*)
printf '<html>rate limited</html>\n' ;;
repos/o/r/issues/7/comments*)
printf '{"message":"Not Found"}\n' ;;
repos/o/r/issues/8/comments*)
printf '[[{"id":801,"user":"not-an-object","body":"x"}]]\n' ;;
repos/o/r/issues/9/comments*)
printf '[[{"id":901,"user":{"login":"someone","type":"User"},"body":"I saw <!-- my-marker --> quoted"}],[{"id":902,"user":{"login":"github-actions[bot]","type":"Bot"},"body":"<!-- my-marker -->\\nold"}]]\n' ;;
repos/o/r/issues/10/comments*)
printf '[[{"id":1001,"user":{"login":"someone","type":"User"},"body":"I saw <!-- my-marker --> quoted"}]]\n' ;;
*)
echo "unexpected gh api path: $path" >&2
exit 99 ;;
esac
STUB
chmod +x "$GH_STUB"

# run_has ISSUE SECTION -> sets rc and err
run_has() {
: > "$CALL_LOG"
err=$(CALL_LOG="$CALL_LOG" GH_BIN="$GH_STUB" bash "$HELPER" has o/r "$1" "$2" 2>&1 >/dev/null)
rc=$?
}

run_has 1 issue-close
if [ "$rc" -eq 0 ]; then pass "has: card carrying issue-close reports present"; else bad "has issue-close on #1: expected 0, got ${rc} (${err})"; fi

run_has 1 issue-closed
if [ "$rc" -eq 1 ]; then pass "has: section keys match exactly, not by prefix"; else bad "has issue-closed on #1: expected 1, got ${rc}"; fi

run_has 2 issue-partial:163
if [ "$rc" -eq 1 ]; then pass "has: issue-partial:163 does not match issue-partial:1638"; else bad "has issue-partial:163 on #2: expected 1, got ${rc}"; fi

run_has 2 issue-partial:
if [ "$rc" -eq 0 ]; then pass "has: a trailing colon is an explicit prefix match"; else bad "has issue-partial: on #2: expected 0, got ${rc}"; fi

run_has 3 issue-close
if [ "$rc" -eq 1 ] && [ -z "$err" ]; then pass "has: no card is ordinary absence (exit 1, no error)"; else bad "has on #3 (no card): expected 1 and no stderr, got ${rc} (${err})"; fi

run_has 4 issue-close
if [ "$rc" -eq 1 ]; then pass "has: a human quoting the card's markers is not the card"; else bad "has on #4 (human quote): expected 1, got ${rc}"; fi

for case in "5:API failure" "6:non-JSON response" "7:JSON that is not a comment list" "8:malformed comment object"; do
n="${case%%:*}"; what="${case#*:}"
run_has "$n" issue-close
if [ "$rc" -eq 3 ] && printf '%s' "$err" | grep -q '^hive-status-card: error:'; then
pass "has: ${what} exits 3 with an error, not absence"
else
bad "has on #${n} (${what}): expected exit 3 and an error line, got ${rc} (${err})"
fi
done

: > "$CALL_LOG"
printf 'not json' > "$TMP/bad-comments.json"
CALL_LOG="$CALL_LOG" GH_BIN="$GH_STUB" HIVE_COMMENTS_FILE="$TMP/bad-comments.json" bash "$HELPER" has o/r 1 issue-close >/dev/null 2>&1
rc=$?
if [ "$rc" -eq 3 ] && [ ! -s "$CALL_LOG" ]; then pass "has: an unparseable HIVE_COMMENTS_FILE is an error and issues no GET"; else bad "bad HIVE_COMMENTS_FILE: expected 3 and no gh call, got ${rc}"; fi

: > "$CALL_LOG"
CALL_LOG="$CALL_LOG" GH_BIN="$GH_STUB" HIVE_COMMENTS_FILE="$TMP/missing.json" bash "$HELPER" has o/r 1 issue-close >/dev/null 2>&1
rc=$?
if [ "$rc" -eq 3 ]; then pass "has: a missing HIVE_COMMENTS_FILE is an error"; else bad "missing HIVE_COMMENTS_FILE: expected 3, got ${rc}"; fi

BODY="$TMP/body.md"
printf '<!-- my-marker -->\nnew\n' > "$BODY"

run_upsert() {
: > "$CALL_LOG"
CALL_LOG="$CALL_LOG" GH_BIN="$GH_STUB" bash "$HELPER" upsert o/r "$1" '<!-- my-marker -->' "$BODY" >/dev/null 2>&1
rc=$?
}

run_upsert 9
if [ "$rc" -eq 0 ] && grep -q '^PATCH repos/o/r/issues/comments/902$' "$CALL_LOG" \
&& ! grep -q '901' "$CALL_LOG" && ! grep -q '^POST' "$CALL_LOG"; then
pass "upsert: edits the posting identity's own marker comment (found on a later page)"
else
bad "upsert #9: expected one PATCH of 902 (rc=${rc})"; sed 's/^/ | /' "$CALL_LOG"
fi

run_upsert 10
if [ "$rc" -eq 0 ] && grep -q '^POST repos/o/r/issues/10/comments$' "$CALL_LOG" && ! grep -q '^PATCH' "$CALL_LOG"; then
pass "upsert: never edits another author's comment carrying the marker; creates its own"
else
bad "upsert #10: expected a POST and no PATCH (rc=${rc})"; sed 's/^/ | /' "$CALL_LOG"
fi

run_upsert 3
if [ "$rc" -eq 0 ] && grep -q '^POST repos/o/r/issues/3/comments$' "$CALL_LOG"; then
pass "upsert: creates the comment when no marker comment exists"
else
bad "upsert #3: expected a POST (rc=${rc})"; sed 's/^/ | /' "$CALL_LOG"
fi

for n in 5 6; do
run_upsert "$n"
if [ "$rc" -eq 3 ] && ! grep -q -E '^(POST|PATCH)' "$CALL_LOG"; then
pass "upsert: a read failure on #${n} exits 3 without posting a duplicate"
else
bad "upsert #${n}: expected exit 3 and no write (rc=${rc})"; sed 's/^/ | /' "$CALL_LOG"
fi
done

if [ "$fail" -ne 0 ]; then
echo "test-hive-status-card FAILED"
exit 1
fi
echo "test-hive-status-card OK"
1 change: 1 addition & 0 deletions .github/workflows/dashboard-mobile-shots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'src/pkg/dashboard/**'
- 'src/scripts/dashboard-mobile-shots.mjs'
- 'src/scripts/fixtures/dashboard-preparation-rail.mjs'
- 'src/scripts/fixtures/dashboard-activity-density.mjs'
- '.github/workflows/dashboard-mobile-shots.yml'

concurrency:
Expand Down
45 changes: 43 additions & 2 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fossa:
name: FOSSA license scan
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
steps:
Expand All @@ -33,10 +33,51 @@ jobs:
if: env.FOSSA_API_KEY == ''
run: echo "FOSSA_API_KEY secret not set; skipping FOSSA scan." >> "$GITHUB_STEP_SUMMARY"

# The key must be a push-only token from the *CNCF* FOSSA organization so
# the project lands in the CNCF instance (cncf/sandbox#545). `team` takes
# the team NAME, not the numeric id, and is honored only on the very first
# upload that creates the project (fossa-cli docs/references/files/fossa-yml.md).
# With `run-tests: true` the action runs ONLY `fossa test` (no analyze)
# and forwards `team`/`branch` to it, which `fossa test` rejects. So:
# always analyze (upload), then on PRs run the policy test separately.
- name: Run FOSSA scan
if: env.FOSSA_API_KEY != ''
uses: fossas/fossa-action@29693cc50323968e039056be419b32989fc5880c # v2.0.0
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
run-tests: ${{ github.event_name == 'pull_request' }}
project: hivecommons/hive
team: Hive Commons
branch: ${{ github.head_ref || github.ref_name }}

# A recent base-branch push may still be queued or analyzing in FOSSA.
# Upload the exact diff baseline here so the PR test does not race it.
# Check it out after the PR scan to keep it out of that scan's discovery.
- name: Checkout FOSSA diff baseline
if: env.FOSSA_API_KEY != '' && github.event_name == 'pull_request'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.base.sha }}
path: .fossa-base
persist-credentials: false

- name: Analyze FOSSA diff baseline
if: env.FOSSA_API_KEY != '' && github.event_name == 'pull_request'
working-directory: .fossa-base
env:
FOSSA_BASE_SHA: ${{ github.event.pull_request.base.sha }}
FOSSA_BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
# Reuse the CLI installed by Run FOSSA scan; the action has no revision input.
run: |
fossa analyze --project hivecommons/hive \
--revision "$FOSSA_BASE_SHA" \
--branch "$FOSSA_BASE_BRANCH" \
--team "Hive Commons"

- name: Run FOSSA policy test
if: env.FOSSA_API_KEY != '' && github.event_name == 'pull_request'
uses: fossas/fossa-action@29693cc50323968e039056be419b32989fc5880c # v2.0.0
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
project: hivecommons/hive
run-tests: true
test-diff-revision: ${{ github.event.pull_request.base.sha }}
Loading
Loading