Skip to content

Admin showcase panel for signed-in users - #1135

Closed
northdpole wants to merge 44 commits into
cursor/oie-scheduled-runs-eb24from
cursor/admin-panel-showcase-ccdd
Closed

northdpole wants to merge 44 commits into
cursor/oie-scheduled-runs-eb24from
cursor/admin-panel-showcase-ccdd

Conversation

@northdpole

@northdpole northdpole commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Admin IA redesign stacked on the OIE / OWASP-agent tip (cursor/oie-scheduled-runs-eb24, PR #1132). When we merge, merge the whole stack — not this PR onto main alone.

Mac handover

See docs/oie/admin-e2e-mac-handover.md — open questions first, then local run / API / E2E sequence. Continue validation on Mac, not cloud agent.

git fetch origin cursor/admin-panel-showcase-ccdd && git checkout cursor/admin-panel-showcase-ccdd && git pull
SKIP_UPSTREAM_SYNC=1 PORT=5001 make dev

What changed

  • make install / make dev → Docker Postgres + upstream CRE when empty
  • Admin Config: golden-set harvest + OWASP agent sync buttons
  • Graph JSON errors; OIE skip/flag observability
  • Default admin ingest still skips B/C unless skip_b/skip_c false (full E2E must override + LLM keys)

Explorer after upstream sync
explorer-after-upstream-sync.mp4

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · 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.

@cursor
cursor Bot force-pushed the cursor/admin-panel-showcase-ccdd branch 2 times, most recently from 117039c to 67213ff Compare October 6, 2026 09:17
summary = import_impact.impact_summary_for_run(run_id, database)
except Exception as e:
logger.exception("Impact failed run_id=%s", run_id)
return jsonify({"description": f"Impact failed: {e}", "run_id": run_id}), 400
summary.get("operation_count"),
summary.get("warnings"),
)
return jsonify(summary)


def _err(status: int, description: str) -> Tuple[Any, int]:
return jsonify({"description": description}), status
repo=None,
canonical=f"github.com/{owner}/",
)
if not text.lower().startswith("github.com/"):
northdpole and others added 24 commits October 6, 2026 14:58
Admin at /admin (not /myopencre) covers import review, pipeline logs,
ingestion targets and start, allowlisted config, OWASP agent status,
and a MyOpenCRE deep-link. Mutations stay behind login plus CRE_ALLOW_IMPORT.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Add changeset graph and mapping edit UI, CI/CD pipeline strip, OIE start
(dry-run default, no git sync unless asked), agent path/counts from env,
and config restart-copy instructions. Roles stay out of scope.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Write add/remove mapping edits to document, keep the changeset in the
save response, and ignore client dry-run/sync/run_oie flags.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Avoids rebinding the web worker's SQLAlchemy app via create_app.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…d discard.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Record OIE child failures as error events, ignore live cache URLs so
dry-run cannot move harvest checkpoints, and treat non-OK target/config
responses as errors in the UI.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Hide the showcase when CRE_ALLOW_IMPORT is off, matching the header
nav and API kill switch. Failed target deletes now show the API error.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
openRun now checks res.ok and does not populate the mapping editor
from error JSON. Successful target add/start/delete clears a stale
error banner.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Skip blank standard names so impact no longer calls get_nodes(""),
return 400 JSON instead of a 500 HTML page on graph failures, and
show impact warnings in the admin review UI.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Drop SQLite file-path probing for the agent index. Config help and
admin status now expect a Postgres URL and ignore other values.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Return JSON error bodies instead of HTML abort pages, ignore bad
repos.yaml on seed, and cover blank/duplicate/disabled target and
mapping edge cases in API and Admin UI tests.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Save writes the packaged harvester yaml. Start one-off uses a temp
copy so custom yaml does not overwrite it. Import review source is a
custom name or repos.yaml:<sha256-12>. GitHub org expand fills
repositories (skipping forks, archived, and existing owner/repo).

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Allowlist GitHub owner logins, quote the API path, cap yaml at 256KiB
before safe_load, and write packaged repos.yaml atomically.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
The 256KiB parse limit rejected a full GitHub org dump. Keep a
size cap, but large enough for up to 1000 repository entries.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Config is a sync write of github.com/org/ (or a single repo URL).
The indexer lists org repos at harvest time and classifies each as
OpenCRE or OWASP-agent material. Add org no longer calls GitHub.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Drop the dedicated Admin tab. Resources lists a virtual owasp-agent
row with status in spec; Start now runs the same harvest as oie_repo.
The built-in id is reserved, skipped on yaml seed, and cannot be
removed unless a leftover DB row exists.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
northdpole and others added 6 commits October 6, 2026 15:01
Save, Add org, and one-off ingest probe api.github.com for each sources
URL before writing or starting harvest. Missing, private, or timed-out
orgs/repos return 400 with the canonical URL. The indexer still expands
reachable orgs later.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Admin home lists running jobs and links through to pipeline logs.
Config edits targets.yaml (cron, add-org, add-target form) plus every
.env.example env var with secrets redacted. Pipeline New can harvest
the packaged yaml or a one-off repository. Graph management reviews
per-link approve/deny/relink for each run. MyOpenCRE stays a separate
route.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Add org now writes packaged repos.yaml after the GitHub probe, matching
Add target. Graph management notes that link decisions stay on the staged
run until CRE-edge apply lands. Failed applies no longer look complete.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Remove the separate agent DB env var. Admin status and config read
DATABASE_URL / DEV_DATABASE_URL (same Postgres as CRE + pgvector).

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Admin invoked python /abs/scripts/run_oie_pipeline.py, so sys.path[0]
was scripts/ and `import application` failed. Other threads set
PYTHONPATH= at the repo root. Put the repo on sys.path in the script
and in the admin subprocess env.

IndexStore now defaults to DATABASE_URL / DEV_DATABASE_URL instead of
tmp/owasp_agent.sqlite. OWASP_AGENT_DB remains a test override.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@cursor
cursor Bot force-pushed the cursor/admin-panel-showcase-ccdd branch from befb62e to e568996 Compare October 6, 2026 15:07
@cursor
cursor Bot changed the base branch from main to cursor/oie-scheduled-runs-eb24 October 6, 2026 15:07
except Exception as exc:
logger.exception("ingest start failed")
return _err(500, f"ingest start failed: {exc}")
return jsonify(result)
northdpole and others added 13 commits October 6, 2026 15:12
DEV_DATABASE_URL wins under FLASK_CONFIG=development so chat/MCP
match the running app. PROD_DATABASE_URL is ignored outside
production. IndexStore rewrites Heroku-style postgres:// URLs.
Synth eval uses the same default as sync.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
SQLAlchemy 2.1 maps postgresql:// to psycopg v3; pin psycopg2 via
postgresql+psycopg2://. Admin invoke_oie_cli uses the app Postgres URL
and refuses sqlite. `make admin-local` starts cre-postgres when the URL
is down, migrates, create_all, and launches Flask without CRE_CACHE_FILE.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Production and admin/agent now share main_db_env_keys (DATABASE_URL
before PROD_DATABASE_URL). Rewrite postgresql+psycopg:// to
+psycopg2. Gate local create_all behind ADMIN_LOCAL_CREATE_ALL.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Live defaults sync repos and persist to Postgres; auto-skip B/C without
LLM keys; async API with wait=true for sync probes. Treat harvester
degraded as non-fatal and surface chunks/files in stage detail.
Pass --max-repos through the CLI so admin caps stay effective.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Empty locale stubs in Top10 aborted the whole repo harvest; skip and
continue so golden-set ingest can finish. Admin agent status now counts
all public tables and reports MAX(fetched_at) as last_sync.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Map only Module C safety-path degraded as non-fatal so A/B degraded
halts before B/C again. Reject max_repos < 1. Always skip B/C unless
the client opts in so LLM keys cannot launch expensive stages from New.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Admin /rest JSON errors no longer collapse to HTML "Resource Not found".
List backfills missing staged_change_set rows. Graph UI shows Accept
feedback, disables dead actions, and explains empty CRE changesets on
OIE harvest runs (ops live in harvest_input).

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Orchestrator JSON now includes engine, flags, graph_path, and visited.
Skip stage details explain caller flags; harvester detail notes HEAD
checkpoints when chunks=0. Admin records oie_trace and richer started JSON.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
OIE harvest fills harvest_input but not the explorer graph; run
cre.py --upstream_sync before Flask unless the cre/node tables
already have data (SKIP_UPSTREAM_SYNC / FORCE_UPSTREAM_SYNC overrides).

Co-authored-by: Spyros <northdpole@users.noreply.github.com>
make install now migrates Docker Postgres and upstream-syncs an empty
CRE graph; make dev / dev-flask / admin-local share run_admin_local.sh.
install-python falls back to python3 -m venv; clear PORT=5001 hint for
macOS AirPlay on :5000.

Co-authored-by: Spyros <northdpole@users.noreply.github.com>
Add POST /admin/agent/sync (Pipeline events) and Config buttons to run
packaged golden-set OIE harvest and agent metadata sync end-to-end
without re-running upstream CRE import at launch.

Co-authored-by: Spyros <northdpole@users.noreply.github.com>
Open questions first, then run instructions, APIs, and stack context
so the full pipeline loop can continue on a local machine.

Co-authored-by: Spyros <northdpole@users.noreply.github.com>
Both migrations descended from 967016ee10fa, leaving two alembic heads and
breaking 'flask db upgrade'. The admin PR is stacked on the scheduler PR, so
its revision now follows b8c9d0e1f2a3.
@northdpole northdpole closed this Oct 7, 2026
@northdpole
northdpole deleted the cursor/admin-panel-showcase-ccdd branch October 7, 2026 07:51
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.

2 participants