feat(metric): Flow Load — WIP per ISO week + author concurrency#25
Merged
Conversation
…rency Counts PRs in flight per week (segmented by intent from the PR title) and the number of distinct commit authors per week as a separate engineering- parallelism proxy. Why: AI assistants tend to expand in-flight work faster than they compress lifecycle time, so throughput numbers can look healthy while flow is congesting. Prereq — PullRequest model + GitHub reader gain state/closed_at and fetch open + closed-without-merge PRs alongside merged ones, with window-overlap filtering. Existing PR consumers (pr_lifecycle, activity_timeline, acceptance_rate) filter to state="merged" where the semantics require it. New: `iris/analysis/flow_load.py` emits per-week wip_total, wip_by_intent and author_concurrency. The author list itself is not persisted — only the count — to keep this aggregate from being usable to rank individuals (Principle #2). Closes #16 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit 522ec32 gated the credentials provider behind the passwordAuth feature flag, which is off by default. The pre-existing "has at least the credentials provider" test asserted len >= 1 and broke the moment the flag flipped. Mock `isFeatureEnabled('passwordAuth')` to true inside the test so the assertion exercises the intended contract (providers list is built correctly when credentials are enabled). Unblocks CI for #25; the failure is pre-existing on main. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
trentas
added a commit
that referenced
this pull request
May 12, 2026
Bump version, refresh the CLI banner, and document the v1.0.4 entry in CHANGELOG.md so `iris upgrade` picks up the Flow Load metric shipped in #25. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/METRICS.md)Closes #16.
Why this matters
AI assistants tend to expand the amount of in-flight work faster than they compress lifecycle time. Without measuring WIP simultâneo, "more PRs/week" looks like throughput when it's actually congestion. The intent breakdown surfaces a specific pattern Kersten flags in Project to Product — features piling up in parallel while fixes/refactors stagnate.
Key design notes
author_concurrencyexposes only the count of distinct authors per week; the author list stays local toflow_load.py. This is intentional and documented in the module +docs/METRICS.md(Principle build(deps): Bump actions/checkout from 4 to 6 #2).FLOW_LOAD_FEATURE_GROWTH_MULTIPLIER = 1.5/MIN_ABSOLUTE = 2need calibration against 3–5 repos before they earn their keep.What changed
Engine
iris/models/pull_request.py—merged_atnow optional; newclosed_at,state: Literal["open"|"closed"|"merged"]iris/ingestion/github_reader.py— fetches open + closed + merged states, filters by window overlapiris/analysis/{pr_lifecycle,activity_timeline,acceptance_rate}.py— filter tostate == "merged"where semantics require itiris/analysis/flow_load.py(new) —analyze_flow_load(prs, commits, *, bucket="week")iris/metrics/aggregator.py+iris/models/metrics.py—flow_loadfield onReportMetricsiris/i18n.py+iris/reports/narrative.py— descriptive finding + (calibration-pending) feature-growth findingPlatform
platform/src/types/metrics.ts—FlowLoadWeekinterface + optionalflow_loadfieldplatform/src/app/[tenant]/repos/[repoName]/{page,charts}.tsx—FlowLoadCardusing rechartsComposedChart(stacked area by intent +author_concurrencyline on right axis)platform/lib/translations.ts—flowLoad.*strings in en-US and pt-BRDocs & tests
docs/METRICS.md— new section 24 with the overlap rule, edge cases, coverage limitations, and privacy notestests/test_flow_load.py(10 cases) +tests/test_github_reader_state.py(5 cases)Test plan
python -m pytest tests/— 80 passing (15 new)cd platform && npx tsc --noEmit— cleannpx eslinton changed files — cleanFlowLoadCardrenders end-to-end against a real payload — not done in this PR becauseflow_loadonly appears in payloads emitted by an Iris CLI running this branch's analyzer against a repo with PR data. The card is guarded bylength >= 2, so it stays hidden until that ships.Explicit follow-ups (called out in the issue)
FLOW_LOAD_FEATURE_GROWTH_*thresholds with 3–5 real repos before relying on the finding🤖 Generated with Claude Code