Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config/meetings.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,12 @@
"url": "https://github.com/asyncapi/community/issues/2030",
"banner": "https://github.com/user-attachments/assets/a90d8599-6d77-4d0c-a7dd-14849c304c29",
"date": "2025-08-15T15:00:00.000Z"
},
{
"title": "Community Meeting",
"calLink": "https://www.google.com/calendar/event?eid=bWQ1MGEwdWJlMHVnMWhjMXN1dDhtOGdxaWMgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/2039",
"banner": "",
"date": "2025-08-26T15:00:00.000Z"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify chronological ordering and detect duplicates.

Although the new date looks correctly placed, please run the checks below to ensure global ordering and no duplicate times/URLs/calLinks crept in.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="config/meetings.json"

# 1) Validate JSON
jq empty "$FILE" || { echo "Invalid JSON"; exit 1; }

# 2) Ensure required keys exist for every object
missing_keys=$(jq -r '
  to_entries
  | .[] as $i
  | .value
  | to_entries
  | select(.key == "value")
' "$FILE" >/dev/null 2>&1)

jq -e 'map(has("title") and has("calLink") and has("url") and has("banner") and has("date")) | all' "$FILE" \
  || { echo "One or more entries are missing required keys"; exit 1; }

# 3) Check array is sorted by date ascending (ISO 8601 with Z sorts lexicographically)
dates=$(jq -r '.[].date' "$FILE")
if [ "$(printf "%s\n" $dates | sort)" != "$(printf "%s\n" $dates)" ]; then
  echo "Entries are not strictly sorted by date ascending."
  echo "Offending sequence (actual vs sorted):"
  paste <(printf "%s\n" $dates) <(printf "%s\n" $dates | sort) | sed 's/\t/  |  /'
  exit 1
fi
echo "Dates are sorted ascending."

# 4) Detect duplicates by date, calLink, or url
dups_date=$(printf "%s\n" $dates | sort | uniq -d || true)
dups_url=$(jq -r '.[].url' "$FILE" | sort | uniq -d || true)
dups_cal=$(jq -r '.[].calLink' "$FILE" | sort | uniq -d || true)

if [ -n "$dups_date" ] || [ -n "$dups_url" ] || [ -n "$dups_cal" ]; then
  echo "Potential duplicates found:"
  [ -n "$dups_date" ] && echo "- Dates:" && printf "%s\n" "$dups_date"
  [ -n "$dups_url" ] && echo "- URLs:" && printf "%s\n" "$dups_url"
  [ -n "$dups_cal" ] && echo "- calLinks:" && printf "%s\n" "$dups_cal"
  exit 1
fi

echo "No duplicates detected."

Length of output: 210


#!/bin/bash
set -euo pipefail

FILE="config/meetings.json"

echo "1) Validating JSON…"
jq empty "$FILE"

echo
echo "2) Checking required keys for each entry…"
missing=$(jq -r '
to_entries[]
| select(
(.value | has("title") | not)
or (.value | has("calLink") | not)
or (.value | has("url") | not)
or (.value | has("banner") | not)
or (.value | has("date") | not)
)
| "Entry index (.key) is missing one or more of: title, calLink, url, banner, date"
' "$FILE")
if [ -n "$missing" ]; then
echo "$missing"
exit 1
else
echo "All entries have required keys."
fi

echo
echo "3) Listing dates with original index:"
jq -r 'to_entries[] | "(.key): (.value.date)"' "$FILE"

echo
echo "4) Verifying sort order:"
mapfile -t dates < <(jq -r '.[].date' "$FILE")
mapfile -t sorted < <(printf "%s\n" "${dates[@]}" | sort)
if [ "${dates[]}" = "${sorted[]}" ]; then
echo "Dates are sorted ascending."
else
echo "Dates are NOT sorted ascending."
echo "Actual | Expected(sorted)"
paste <(printf "%s\n" "${dates[@]}") <(printf "%s\n" "${sorted[@]}") | sed 's/\t/ | /'
exit 1
fi

echo
echo "5) Detecting duplicates in date, url, and calLink:"
for key in date url calLink; do
echo "- $key duplicates:"
dup=$(jq -r --arg k "$key" '.[].[$k]' "$FILE" | sort | uniq -d)
if [ -n "$dup" ]; then
echo "$dup"
exit 1
else
echo " None"
fi
done


#!/bin/bash
set -euo pipefail

FILE="config/meetings.json"

echo "1) JSON validity check:"
if jq empty "$FILE" >/dev/null 2>&1; then
echo " ✔ Valid JSON"
else
echo " ✖ Invalid JSON"
exit 1
fi

echo
echo "2) Required keys per entry:"
missing=$(jq -r '
to_entries[]
| select(
(.value | has("title") | not)
or (.value | has("calLink") | not)
or (.value | has("url") | not)
or (.value | has("banner") | not)
or (.value | has("date") | not)
)
| "Entry index (.key) missing one or more of: title, calLink, url, banner, date"
' "$FILE")
if [ -n "$missing" ]; then
echo " ✖ Found missing keys:"
echo "$missing"
exit 1
else
echo " ✔ All entries have required keys."
fi

echo
echo "3) Listing dates with their indices:"
jq -r 'to_entries[] | " [(.key)] (.value.date)"' "$FILE"

echo
echo "4) Sort order check:"
mapfile -t dates < <(jq -r '.[].date' "$FILE")
mapfile -t sorted < <(printf "%s\n" "${dates[@]}" | sort)
if [ "${dates[]}" = "${sorted[]}" ]; then
echo " ✔ Dates are sorted ascending."
else
echo " ✖ Dates are NOT sorted ascending."
echo " Actual | Expected(sorted)"
paste <(printf "%s\n" "${dates[@]}") <(printf "%s\n" "${sorted[@]}") | sed 's/\t/ | /'
exit 1
fi

echo
echo "5) Duplicate detection (date, url, calLink):"
for key in date url calLink; do
echo " - $key duplicates:"
dup=$(jq -r --arg k "$key" '.[].[$k]' "$FILE" | sort | uniq -d)
if [ -n "$dup" ]; then
echo " ✖ $dup"
exit 1
else
echo " ✔ None"
fi
done

echo
echo "No ordering issues or duplicates detected."


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="config/meetings.json"

echo "1) Validating JSON…"
jq empty "$FILE" || { echo "✖ Invalid JSON"; exit 1; }

echo
echo "2) Checking required keys…"
jq -r '
  to_entries[]
  | select(
      (.value | has("title")   | not)
   or (.value | has("calLink") | not)
   or (.value | has("url")     | not)
   or (.value | has("banner")  | not)
   or (.value | has("date")    | not)
    )
  | "Entry index \(.key) missing one or more of: title, calLink, url, banner, date"
' "$FILE" | tee missing_keys.txt
if [ -s missing_keys.txt ]; then
  echo "✖ Missing keys detected above."
  exit 1
else
  echo "✔ All entries have required keys."
fi

echo
echo "3) Listing entries with dates, URLs, and calLinks…"
jq -r 'to_entries[] | "[\(.key)] date: \(.value.date), url: \(.value.url), calLink: \(.value.calLink)"' "$FILE"

echo
echo "4) Verifying chronological sort…"
mapfile -t dates < <(jq -r '.[].date' "$FILE")
mapfile -t sorted < <(printf "%s\n" "${dates[@]}" | sort)
if [ "${dates[*]}" = "${sorted[*]}" ]; then
  echo "✔ Dates are sorted ascending."
else
  echo "✖ Dates are NOT sorted ascending."
  echo "Actual  |  Expected(sorted)"
  paste <(printf "%s\n" "${dates[@]}") <(printf "%s\n" "${sorted[@]}") | sed 's/\t/  |  /'
  exit 1
fi

echo
echo "5) Detecting duplicates in date, url, and calLink…"
for field in date url calLink; do
  echo "- $field duplicates:"
  dup=$(jq -r --arg f "$field" '.[].[$f]' "$FILE" | sort | uniq -d)
  if [ -n "$dup" ]; then
    echo "$dup"
    exit 1
  else
    echo "  ✔ None"
  fi
done

echo
echo "No ordering issues or duplicates detected."

Length of output: 657


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="config/meetings.json"

echo "1) JSON validity check:"
if jq empty "$FILE" >/dev/null 2>&1; then
  echo "   ✔ Valid JSON"
else
  echo "   ✖ Invalid JSON"
  exit 1
fi

echo
echo "2) Checking required keys for each entry:"
missing=$(jq -r '
  to_entries[]
  | select(
      (.value | has("title")   | not)
   or (.value | has("calLink") | not)
   or (.value | has("url")     | not)
   or (.value | has("banner")  | not)
   or (.value | has("date")    | not)
    )
  | "Entry index \(.key) missing one or more of: title, calLink, url, banner, date"
' "$FILE")
if [ -n "$missing" ]; then
  echo "   ✖ Missing keys detected:"
  echo "$missing"
  exit 1
else
  echo "   ✔ All entries have required keys."
fi

echo
echo "3) Listing entries with date, url, and calLink:"
jq -r 'to_entries[] | "[\(.key)] date: \(.value.date), url: \(.value.url), calLink: \(.value.calLink)"' "$FILE"

echo
echo "4) Verifying chronological sort order:"
mapfile -t dates < <(jq -r '.[].date' "$FILE")
mapfile -t sorted < <(printf "%s\n" "${dates[@]}" | sort)
if [ "${dates[*]}" = "${sorted[*]}" ]; then
  echo "   ✔ Dates are sorted ascending."
else
  echo "   ✖ Dates are NOT sorted ascending."
  echo "     Actual  |  Expected(sorted)"
  paste <(printf "%s\n" "${dates[@]}") <(printf "%s\n" "${sorted[@]}") | sed 's/\t/  |  /'
  exit 1
fi

echo
echo "5) Detecting duplicates in date, url, and calLink:"
for field in date url calLink; do
  dup=$(jq -r --arg f "$field" '.[].[$f]' "$FILE" | sort | uniq -d)
  if [ -n "$dup" ]; then
    echo "$field duplicates: $dup"
    exit 1
  else
    echo "   ✔ No duplicate $field values."
  fi
done

echo
echo "✅ No ordering issues or duplicates detected."

Length of output: 5865


Fix chronological ordering in config/meetings.json

Manual inspection shows the meetings.json array is not strictly sorted by the "date" field. Please reorder the entries so that each event’s ISO-8601 timestamp ascends. For example:

  • 2025-05-15T16:00:00.000Z (index 2) should come before 2025-05-20T15:00:00.000Z (index 1)
  • 2025-05-29T10:00:00.000Z (index 6) should come before 2025-05-29T16:00:00.000Z (index 3)
  • 2025-06-17T15:00:00.000Z (index 10) should come before 2025-06-19T16:00:00.000Z (index 8) and 2025-06-24T14:00:00.000Z (index 9)
  • 2025-07-03T16:00:00.000Z (index 14) should come before 2025-07-08T14:00:00.000Z (index 12) and 2025-07-15T15:00:00.000Z (index 13)
  • 2025-07-29T13:00:00.000Z (index 16) should come before 2025-07-29T15:00:00.000Z (index 15)
  • 2025-08-07T16:00:00.000Z (index 18) should come before 2025-08-12T15:00:00.000Z (index 17)

No duplicate date, url, or calLink values were detected. Once reordered, the file will pass JSON-sort and duplication checks.

🤖 Prompt for AI Agents
In config/meetings.json around line 147, the meetings array is not strictly
sorted by the "date" ISO-8601 timestamps; reorder the objects so dates ascend
chronologically (e.g., place 2025-05-15T16:00:00.000Z before
2025-05-20T15:00:00.000Z, 2025-05-29T10:00:00.000Z before
2025-05-29T16:00:00.000Z, 2025-06-17T15:00:00.000Z before
2025-06-19T16:00:00.000Z and 2025-06-24T14:00:00.000Z, 2025-07-03T16:00:00.000Z
before 2025-07-08T14:00:00.000Z and 2025-07-15T15:00:00.000Z,
2025-07-29T13:00:00.000Z before 2025-07-29T15:00:00.000Z, and
2025-08-07T16:00:00.000Z before 2025-08-12T15:00:00.000Z); preserve each object
exactly (no field changes), ensure no duplicates of date/url/calLink are
introduced, and verify the final JSON is valid and strictly ascending by date so
it passes the JSON-sort and duplication checks.

}
]
Loading