Repository navigation
fix: honest sprint reader — frontmatter-only active status, unambiguous selectors, conservative scope checks, waiting next batch #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
56101bd
7248249
0b82dc2
1e95651
4a44ef5
0693fc7
46a7b76
ef620a2
58b3eaa
f5086d3
0753cbe
659bb27
5a6b00a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,6 +112,14 @@ function listSprintFiles(sprintsDir) { | |
| return fs.readdirSync(sprintsDir) | ||
| .filter((file) => file.endsWith(".md") && file !== "_context.md") | ||
| .map((file) => path.join(sprintsDir, file)) | ||
| .filter((filePath) => { | ||
| try { | ||
| return fs.statSync(filePath).isFile(); | ||
| } catch (error) { | ||
| if (error.code === "ENOENT") return false; | ||
| throw error; | ||
| } | ||
| }) | ||
| .sort(); | ||
| } | ||
|
|
||
|
|
@@ -170,14 +178,18 @@ function checkActiveSprint({ repoRoot, sprintsDir, tracks = loadActiveTracks(spr | |
| }); | ||
| } | ||
|
|
||
| const scopeless = tracks.filter((track) => sprintScopeKey(track.frontmatter).kind === "none"); | ||
| if (scopeless.length >= 1) { | ||
| // informational: a scopeless track cannot be proven disjoint, but | ||
| // cannot be proven overlapping either. | ||
| const scopelessFiles = scopeless.map((track) => displayPath(repoRoot, track.path)); | ||
| const unprovable = tracks.filter((track) => { | ||
| const key = sprintScopeKey(track.frontmatter); | ||
| return key.kind === "none" || key.kind === "unknown" || key.unknown; | ||
| }); | ||
|
Comment on lines
+181
to
+184
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an active file has both a nonempty AGENTS.md reference: AGENTS.md:L36-L38 Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 4a44ef5: |
||
| const kinds = new Set(tracks.map((track) => sprintScopeKey(track.frontmatter).kind)); | ||
| if (unprovable.length > 0 || (kinds.has("component") && kinds.has("scope"))) { | ||
| const scopelessFiles = tracks | ||
| .filter((track) => sprintScopeKey(track.frontmatter).kind === "none") | ||
| .map((track) => displayPath(repoRoot, track.path)); | ||
| return { | ||
| ...verdict("active_sprint", "warn", { | ||
| summary: `${tracks.length} active tracks; cannot prove disjoint. Without component:/scope: (${scopelessFiles.join(", ")}). Declare component: or scope: on every active track.`, | ||
| summary: `${tracks.length} active tracks; cannot prove disjoint: ${displayActive.join(", ")}. Check scope axes and supported directory prefixes.`, | ||
| active_files: displayActive, | ||
| scopeless_files: scopelessFiles, | ||
| sprint_count: sprintFiles.length, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.