Skip to content

OIE: parse event pages and embed auto-filed nodes - #1136

Open
northdpole wants to merge 4 commits into
admin-panel-showcasefrom
cursor/oie-event-pages-embeddings-eb24
Open

northdpole wants to merge 4 commits into
admin-panel-showcasefrom
cursor/oie-event-pages-embeddings-eb24

Conversation

@northdpole

@northdpole northdpole commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #1135 (tip of the OIE / OWASP agent stack: #1132 -> #1135). Merge the whole stack, not this PR alone.

  • Event pages are metadata, so harvesting them is opt-in. The scheduled owasp job skips kind: event repos unless OIE_HARVEST_EVENTS=1 (default off). --harvester_kinds event on the CLI still works.
  • Event page parsing. event_page.prepare_event_page turns a Jekyll index.md (front matter + schema.org JSON-LD + Liquid) into a title/dates/location/description header plus the markdown body. Pages with no content are skipped and do not block the checkpoint. When enabled, event chunks flow through noise filter and Librarian like other chunks; the filing confidence floor still decides what reaches the graph.
  • Auto-filed nodes get embeddings. New embed_nodes stage (last step of the daily cre_expansion job) embeds oie-auto-filed nodes with no embedding. The pending set is derived from the graph, so a failed run is retried next time. A failure degrades the job but never touches filed nodes/edges. OIE_EMBED_FILED_NODES=0 turns it off.
  • Filed event nodes are embedded from the cleaned page text (hook in in_memory_embeddings.get_content, plain-text and Playwright paths).
  • Page parsing is linear-time on untrusted content (adversarial-input tests included).
  • Migration fix for the stack: f8a9b0c1d2e3 (admin tables, Admin showcase panel for signed-in users #1135) and b8c9d0e1f2a3 (oie_run, OIE: scheduled runs (OWASP every 10 min, CRE expansion daily) #1132) both descended from 967016ee10fa, leaving two alembic heads. The admin migration now follows b8c9d0e1f2a3 (pushed to Admin showcase panel for signed-in users #1135's branch together with a Black fix for its lint).

Verification

  • black --check on changed files: pass.
  • Full unittest suite: 1624 tests, 1 failure (librarian.dataset_test.test_build_check_matches_committed_dataset, also fails on the base branch).
  • Local Postgres: single alembic head, upgrade from scratch, guardrail OK; real harvest of www-event-2020-07-virtual; real embed of an auto-filed node via the default path.

Notes

  • Anyone who already applied f8a9b0c1d2e3 on a DB that lacks b8c9d0e1f2a3 should run flask db upgrade again after pulling.
  • Commits are unsigned (agent cannot sign).
Open in Web Open in Cursor 

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 1
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: OWASP/OpenCRE/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 91ee2cff-799c-4bd5-bfbc-d112cc050401

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from a5f3f94 to 31b475c Compare October 6, 2026 19:57
@northdpole
northdpole marked this pull request as ready for review October 6, 2026 20:11
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch 3 times, most recently from a5b1e06 to 54c372a Compare October 7, 2026 08:42
@northdpole
northdpole force-pushed the admin-panel-showcase branch from e114292 to 4178ecf Compare October 11, 2026 23:04
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 59e02e5 to 872f2fd Compare October 11, 2026 23:05
@northdpole
northdpole force-pushed the admin-panel-showcase branch from 4178ecf to aad929a Compare October 12, 2026 07:05
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 872f2fd to ef95982 Compare October 12, 2026 07:05
@northdpole
northdpole force-pushed the admin-panel-showcase branch from aad929a to 475945f Compare October 12, 2026 07:17
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from ef95982 to 12c281c Compare October 12, 2026 07:17
@northdpole
northdpole force-pushed the admin-panel-showcase branch from 475945f to 48e9d4f Compare October 12, 2026 07:19
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 12c281c to 0e2d99b Compare October 12, 2026 07:19
@northdpole
northdpole force-pushed the admin-panel-showcase branch 2 times, most recently from 30a2a40 to 63d548b Compare October 14, 2026 08:49
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 0e2d99b to 3b6f228 Compare October 14, 2026 08:50
@northdpole
northdpole force-pushed the admin-panel-showcase branch from 63d548b to 864d6e3 Compare October 14, 2026 17:09
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 3b6f228 to 131bb91 Compare October 14, 2026 17:09
@northdpole
northdpole force-pushed the admin-panel-showcase branch from 864d6e3 to bdcb343 Compare October 14, 2026 17:22
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 131bb91 to 840dbc3 Compare October 14, 2026 17:22
@northdpole
northdpole force-pushed the admin-panel-showcase branch from bdcb343 to 62832de Compare October 14, 2026 17:23
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 840dbc3 to 43f2dad Compare October 14, 2026 17:23
@northdpole
northdpole force-pushed the admin-panel-showcase branch from 62832de to e41d93b Compare October 14, 2026 17:56
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 43f2dad to 2be6f9a Compare October 14, 2026 17:56
@northdpole
northdpole force-pushed the admin-panel-showcase branch from e41d93b to a948365 Compare October 15, 2026 00:32
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 2be6f9a to 4f003f0 Compare October 15, 2026 00:33
@northdpole
northdpole force-pushed the admin-panel-showcase branch from a948365 to 3c45bf3 Compare October 15, 2026 12:16
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 4f003f0 to 09a3bd5 Compare October 15, 2026 12:16
@northdpole
northdpole force-pushed the admin-panel-showcase branch from 3c45bf3 to 023a4be Compare October 15, 2026 12:27
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 09a3bd5 to 7e89681 Compare October 15, 2026 12:27
@northdpole
northdpole force-pushed the admin-panel-showcase branch from 023a4be to 18ed280 Compare October 15, 2026 17:43
Event repos (www-event-*) are Jekyll sites: front matter, a schema.org JSON-LD
block and Liquid templating around the real prose. event_page turns that into a
short title/dates/location/description header plus the markdown body, used both
at harvest time and when a filed event node is embedded. Events are now
harvestable; pages with no content are skipped without blocking the checkpoint.
New embed_nodes stage (after gap analysis) embeds auto-filed nodes that have no
embedding yet, so similarity search and chat can see them. The pending set is
derived from the graph, so a failed run is retried next time; failures degrade
the job without touching filed nodes or edges. OIE_EMBED_FILED_NODES=0 turns it
off.
Page content is untrusted: replace unbounded lazy regexes with str.find scans,
bounded tag regexes and a single-pass Liquid block stripper, and cap page size.
The Playwright fallback in get_content now cleans event pages too.
Event pages are metadata, so the scheduled harvest skips them unless
OIE_HARVEST_EVENTS=1. The parser and explicit --harvester_kinds event still work.
@northdpole
northdpole force-pushed the cursor/oie-event-pages-embeddings-eb24 branch from 7e89681 to bc13dc6 Compare October 15, 2026 17:43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant