49 lines
2.6 KiB
Python
49 lines
2.6 KiB
Python
import os
|
|
import requests
|
|
|
|
token = os.environ.get("GITEA_TOKEN")
|
|
if not token:
|
|
raise SystemExit("GITEA_TOKEN env var missing")
|
|
|
|
url = "https://gitea.hmac.kr/api/v1/repos/Kyeongmin/C.E.L_Slide_test2/issues/14/comments"
|
|
|
|
body = """Executing unit: u1
|
|
|
|
[Claude #3] Stage 3 Round #1 — u1 execution report
|
|
|
|
**unit_executed**: u1
|
|
|
|
**files_changed**:
|
|
- templates/phase_z2/slide_base.html
|
|
|
|
**diff_summary**:
|
|
- `<html>` tag: added `{% if embedded_mode == "embedded" %} class="embedded"{% endif %}` (explicit-embedded path).
|
|
- `<head>` (after viewport meta): added conditional `{% if embedded_mode == "auto" %} ... {% endif %}` inline `<script>` (CSP-safe, no external src). Script body: `URLSearchParams(window.location.search).get('embedded') === '1' || window.self !== window.top` → adds `embedded` class to `documentElement`. Wrapped in `try/catch` so cross-origin frame access exception cannot break rendering.
|
|
- `<style>` block (after existing `body` rules, before `.slide`): added additive `html.embedded body { background: transparent; display: block; min-height: 0; padding: 0; }` and `html.embedded .slide { box-shadow: none; }` reset block — undoes standalone-only centering/min-height/padding/shadow without touching the standalone rules above.
|
|
- Existing standalone CSS (lines 14-21 original) untouched.
|
|
- Standalone backward-compat: when `embedded_mode` is undefined (u2 not yet executed), both `{% if %}` blocks evaluate falsy in Jinja2 → no class, no script, no reset CSS → identical to pre-IMP-14 standalone render.
|
|
|
|
**guardrail check**:
|
|
- G1 (no AI/Phase R' regression): zero AI hook added. Only static Jinja2 + literal inline JS string.
|
|
- G2 (Jinja2 determinism): all additions are deterministic literal text or conditional on `embedded_mode` value alone (no randomness, no env lookup).
|
|
- Scope-lock: edits confined to `templates/phase_z2/slide_base.html` only. estimate_lines budget = 30; actual added ~24 (script 11 + reset CSS 10 + html attr 1 + comment 2). Under budget.
|
|
|
|
**remaining_units**:
|
|
- u2 — `src/phase_z2_pipeline.py` `render_slide` signature + Jinja2 context wiring
|
|
- u3 — `Front/client/src/components/SlideCanvas.tsx` `?embedded=1` query + reset-CSS injection removal
|
|
- u4 — `tests/phase_z2/test_slide_base_embedded_mode.py` 6 cases
|
|
|
|
**follow_up_issue_candidates**: none — no scope-lock 외 axis surfaced during u1 edit. Stage 1/2 guardrails (G1/G2/A1/A2/D1) still intact.
|
|
|
|
**next**: STOP. Awaiting Codex review. Continue with u2 on `continue_same` consensus.
|
|
"""
|
|
|
|
response = requests.post(
|
|
url,
|
|
headers={"Authorization": f"token {token}"},
|
|
json={"body": body},
|
|
timeout=30,
|
|
)
|
|
print(response.status_code)
|
|
print(response.text[:500])
|