Skip to content
Open
Show file tree
Hide file tree
Changes from 11 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
351 changes: 256 additions & 95 deletions beps/bep_hooks.py

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions beps/debug_hook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

import sys
import os
from pathlib import Path

# Add current dir to path to import bep_hooks
sys.path.append(os.getcwd())
import bep_hooks

# Mock Page object
class MockFile:
def __init__(self, src_path):
self.src_path = src_path

class MockPage:
def __init__(self, src_path):
self.file = MockFile(src_path)

# Read the actual file content
file_path = Path("docs/proposals/BEP-001-exceptions/context/go.md")
with open(file_path, "r") as f:
Copy link

Choose a reason for hiding this comment

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

Bug: Debug script references deleted file path

This debug script references docs/proposals/BEP-001-exceptions/context/go.md, but this file was deleted in the same commit. The script will crash with FileNotFoundError when executed. This appears to be a development debugging tool that was accidentally committed alongside the production code changes.

Fix in Cursor Fix in Web

markdown = f.read()

print(f"Original Markdown Length: {len(markdown)}")

# Run the hook
try:
result = bep_hooks.on_page_markdown(markdown, MockPage("proposals/BEP-001-exceptions/context/go.md"))
print(f"Result Markdown Length: {len(result)}")
print("--- RESULT START ---")
print(result[:500]) # Print first 500 chars
print("--- RESULT END ---")
print("--- RESULT TAIL ---")
print(result[-500:])
print("--- RESULT TAIL END ---")

if len(result) == 0:
print("ERROR: Result is empty!")
except Exception as e:
print(f"ERROR: Hook failed with {e}")
import traceback
traceback.print_exc()
5 changes: 4 additions & 1 deletion beps/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ Below is an auto-generated index of all BEPs.
</thead>
<tbody>
<tr>
<td><a href="./proposals/BEP-001-exceptions/README.md"><strong>BEP-001</strong>: Exceptions</a> &nbsp; <img src="https://img.shields.io/badge/Status-Draft-lightgrey" alt="Draft"><br><br>This is a placeholder for the Exceptions design proposal.<br><br><span style='font-size:0.8em; color:gray'>Shepherd(s): Vaibhav Gupta <[email protected]> | Created: 2025-11-20 | Updated: 2025-11-28</span></td>
<td><a href="./proposals/BEP-001-exceptions/README.md"><strong>BEP-001</strong>: Exception Handling</a> &nbsp; <img src="https://img.shields.io/badge/Status-Draft-lightgrey" alt="Draft"><br><br><br><br><span style='font-size:0.8em; color:gray'>Shepherd(s): Vaibhav Gupta <[email protected]> | Created: 2025-11-20 | Updated: 2025-12-02</span></td>
</tr>
<tr>
<td><a href="./proposals/BEP-002-match/README.md"><strong>BEP-002</strong>: match</a> &nbsp; <img src="https://img.shields.io/badge/Status-Draft-lightgrey" alt="Draft"><br><br><br><br><span style='font-size:0.8em; color:gray'>Shepherd(s): hellovai <[email protected]> | Created: 2025-12-01 | Updated: 2025-12-01</span></td>
</tr>
</tbody>
</table>
Expand Down
Loading
Loading