docs(polymarket-browse): update SKILL.md with troubleshooting, examples, changelog, credits #37

Closed
shoko wants to merge 0 commits from docs/11-12-skill-updates into master
Owner

Summary

Update SKILL.md with missing documentation as requested in #11 and #12.

Changes

Issue #12 - --detail argument clarification

  • Clarify --detail only applies to MATCH markets (not non-match)
  • Document error behavior when out of range

Issue #11 - Missing documentation

  • Troubleshooting section: Common issues like partial fetch, no markets, match disappearance, Telegram problems
  • Examples section: Basic usage, team search, filtering, --detail usage, debugging, timezone
  • Changelog section: Version history (v0.0.1, v0.0.2)
  • Credits section: Author and repository info

Testing

70/70 tests passing

## Summary Update SKILL.md with missing documentation as requested in #11 and #12. ## Changes ### Issue #12 - --detail argument clarification - Clarify --detail only applies to MATCH markets (not non-match) - Document error behavior when out of range ### Issue #11 - Missing documentation - **Troubleshooting section**: Common issues like partial fetch, no markets, match disappearance, Telegram problems - **Examples section**: Basic usage, team search, filtering, --detail usage, debugging, timezone - **Changelog section**: Version history (v0.0.1, v0.0.2) - **Credits section**: Author and repository info ## Testing 70/70 tests passing
shoko added 1 commit 2026-03-26 20:16:40 +01:00
- Clarify --detail argument (only for MATCH markets, error on out of range)
- Add Troubleshooting section with common issues
- Add Examples section with usage patterns
- Add Changelog section
- Add Credits section
shoko reviewed 2026-03-27 01:51:05 +01:00
shoko left a comment
Author
Owner

Review requested

Review requested
shoko added the need review label 2026-03-27 01:52:47 +01:00
shoko added 20 commits 2026-03-27 03:40:59 +01:00
- Add --starts-before CLI argument accepting Unix timestamp
- Filter match events to only show those starting before timestamp
- LIVE events are always included regardless of timestamp
- Update SKILL.md documentation
- Add TestStartsBeforeFilter with 3 unit tests
- Add parse_timezone() function supporting UTC+X format
- Add --timezone argument (default: UTC+7)
- Module-level _DISPLAY_TZ controls all time display formatting
- get_header_date() and _get_time_data() use _DISPLAY_TZ
- Add TestTimezoneParsing unit tests
- Update SKILL.md documentation
- Lines 386, 400: except: changed to except (ValueError, TypeError):
- ValueError: datetime.fromisoformat parse failure
- TypeError: input is not a string
- Prevents swallowing KeyboardInterrupt, SystemExit, MemoryError
- Add sys import for stderr/exit
- Validate --detail index before accessing array
- Show error with available range instead of silent fallback to first event
- Exit with code 1 if --detail is out of range
- Import quote from urllib.parse
- Replace q.replace(' ', '%20') with quote(q, safe='')
- Properly encodes: &, =, %, +, #, ?, and other special chars
- Prevents URL injection attacks
- Add MAX_RESPONSE_SIZE = 10MB constant
- Check response size before json.loads() in fetch_page()
- Raises ValueError if response exceeds limit
- Prevents memory exhaustion from malicious/gigantic API responses
- Add RateLimiter class (token bucket algorithm)
- Thread-safe for use with ThreadPoolExecutor
- RATE_LIMIT_CALLS = 10 per RATE_LIMIT_WINDOW = 1 second
- _rate_limiter.acquire() called before each API request
- Also add MAX_RESPONSE_SIZE check in fetch_page
- Document fixed security issues from 2026-03-25 audit
- Track all 7 security issues and their fixes
- Add reporting instructions
Add TestUrlEncoding class testing quote() encodes:
- Space -> %20
- & -> %26
- = -> %3D
- % -> %25
- + -> %2B
- ( -> %28
- ) -> %29
- # -> %23
- Replace fixed 10MB limit with dynamic calculation
- get_max_response_size() computes limit based on PAGE_SIZE * multiplier
- Uses 10x multiplier (e.g., PAGE_SIZE=50 -> ~500KB * 10 = ~5MB)
- Clamped between 10MB minimum and 100MB maximum
- Formula: max(PAGE_SIZE * multiplier, 10MB) capped at 100MB
Conflicts resolved:
- browse.py: keep both --starts-before and --timezone args
- test_browse.py: combine TestStartsBeforeFilter and TestTimezoneParsing
- SKILL.md: combine documentation for both args
Combined MAX_RESPONSE_SIZE dynamic calculation with RateLimiter class.
- Bump version to 0.0.3
- Update changelog with all security fixes and features
- Add TokenBucket rate limiting to Rate Limiting section
- Add URL encoding note
shoko added 1 commit 2026-03-27 03:44:30 +01:00
Security findings tracked in GitHub issues instead.
shoko added 1 commit 2026-03-27 03:48:33 +01:00
shoko closed this pull request 2026-03-27 04:09:45 +01:00

Pull request closed

Sign in to join this conversation.