-
Notifications
You must be signed in to change notification settings - Fork 3
docs: fill missing CHANGELOG entries; fix map-release Gate 12 awk bug #324
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
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 |
|---|---|---|
|
|
@@ -198,8 +198,12 @@ if [[ -n "$LAST_TAG" ]]; then | |
| # maintenance commits, which otherwise make this heuristic chase its own fixes. | ||
| COMMITS_SINCE=$(git log ${LAST_TAG}..HEAD --no-merges --format="%s" | awk '!/^(docs\(changelog\)|chore\(release\):)/ { count++ } END { print count + 0 }') | ||
|
|
||
| # Count CHANGELOG entries in [Unreleased] section | ||
| CHANGELOG_ENTRIES=$(awk '/## \[Unreleased\]/,/## \[/' CHANGELOG.md | grep -cE "^- " || echo "0") | ||
| # Count CHANGELOG entries in [Unreleased] section. | ||
| # NOTE: a range-pattern awk (/start/,/end/) collapses to the single | ||
| # matching line when start and end match the SAME line — and "## | ||
| # [Unreleased]" matches both "/## \[Unreleased\]/" and "/## \[/". Use an | ||
| # explicit flag instead so the range spans past the heading line itself. | ||
| CHANGELOG_ENTRIES=$(awk '/^## \[Unreleased\]/{f=1;next} /^## \[/{f=0} f' CHANGELOG.md | grep -cE "^- " || echo "0") | ||
|
Comment on lines
+201
to
+206
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. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
file='src/mapify_cli/templates_src/skills/map-release/SKILL.md.jinja'
# Show the relevant section with line numbers
sed -n '190,215p' "$file" | cat -n
# Inspect how CHANGELOG_ENTRIES is later used
rg -n "CHANGELOG_ENTRIES|CHANGELOG.md|grep -cE \"^- \"" "$file"Repository: azalio/map-framework Length of output: 2029 Drop the 🤖 Prompt for AI Agents |
||
|
|
||
| echo "Counted commits since $LAST_TAG: $COMMITS_SINCE" | ||
| echo "(excluding docs(changelog) and chore(release) maintenance commits)" | ||
|
|
@@ -216,7 +220,7 @@ if [[ -n "$LAST_TAG" ]]; then | |
| echo "════════════════════════════════════════════════════════" | ||
| echo "" | ||
| echo "Current CHANGELOG [Unreleased] content:" | ||
| awk '/## \[Unreleased\]/,/## \[/' CHANGELOG.md | sed '$d' | ||
| awk '/^## \[Unreleased\]/{f=1;next} /^## \[/{f=0} f' CHANGELOG.md | ||
| echo "" | ||
|
|
||
| # Ask user to update CHANGELOG | ||
|
|
@@ -289,7 +293,7 @@ Read CHANGELOG.md [Unreleased] section to determine bump type: | |
|
|
||
| ```bash | ||
| # Extract unreleased changes | ||
| UNRELEASED_CHANGES=$(awk '/## \[Unreleased\]/,/## \[/' CHANGELOG.md | sed '$d') | ||
| UNRELEASED_CHANGES=$(awk '/^## \[Unreleased\]/{f=1;next} /^## \[/{f=0} f' CHANGELOG.md) | ||
| ``` | ||
|
|
||
| **Semantic Versioning Rules:** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
sed -n '190,230p' src/mapify_cli/templates/skills/map-release/SKILL.mdRepository: azalio/map-framework
Length of output: 2029
Drop the
|| echo "0"fallback.grep -calready prints0when there are no matches, so the fallback turns that into0\n0and can break the later numeric comparison. Count inawkor suppress the exit status without printing another value.🧰 Tools
🪛 SkillSpector (2.3.7)
[warning] 19: [EA2] Autonomous Decision Making: Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
Remediation: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
(Excessive Agency (EA2))
[error] 1114: [TM1] Tool Parameter Abuse: Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
Remediation: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
(Tool Misuse (TM1))
🤖 Prompt for AI Agents