Skip to content

chore: apply byte5ai engineering-standards (initial bootstrap) - #31

Merged
iret77 merged 1 commit into
mainfrom
chore/engineering-standards
May 17, 2026
Merged

chore: apply byte5ai engineering-standards (initial bootstrap)#31
iret77 merged 1 commit into
mainfrom
chore/engineering-standards

Conversation

@iret77

@iret77 iret77 commented May 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Bringt das Repo auf den byte5ai-Engineering-Standard. Additive Änderung — kein bestehendes Verhalten wird ersetzt.

  • .github/engineering-standards.yml (neu): expliziter status: applied-Marker, Source byte5ai/engineering-standards, decided/reviewed 2026-05-17.
  • .hooks/pre-push (neu, +x): blockiert direkte Pushes auf main/master. Override via ALLOW_PUSH_TO_MAIN=1 für Notfälle.
  • script/setup (neu, +x): One-Command-Bootstrap — core.hooksPath = .hooks, npm install in middleware/ und web-ui/. Spiegelt die manuellen Schritte in CONTRIBUTING.md.
  • AGENTS.md: neue Section "Git Workflow & Engineering Standards" (Branch-Naming, Conventional Commits, Verbot von Co-Authored-By:-Trailern für KI-Agenten, kein Force-Push, kein --no-verify). Veralteter Satz "Git gibt es aktuell nicht — Stand 2026-04-19" korrigiert (Repo ist seit 2026-05 öffentlich auf GitHub).
  • CONTRIBUTING.md: Pre-Push-Guard-Hinweis im Verification-Block; Verbot von Co-Authored-By:-Trailern im PR-Workflow.

Branch Protection auf main wird in einem separaten Schritt nach dem Merge per GitHub-API gesetzt — danach sind die CI-Status-Check-Kontexte registriert und können als Required Checks gepinnt werden:
middleware (lint + typecheck + test), web-ui (lint + typecheck + vitest), schema (migrations on pgvector), audit (high+critical block) (middleware|web-ui).

Hinweis: Required Status Checks haken sich an Job-Namen. Wenn ci.yml-Job-name:-Felder geändert werden, muss das Branch-Protection-PUT entsprechend nachgezogen werden.

Test plan

  • Hook-Smoke lokal: refs/heads/main-Push → BLOCKED, Exit 1
  • Hook-Override: ALLOW_PUSH_TO_MAIN=1 → Exit 0
  • Hook-Passthrough für Feature-Branch (chore/foo) → Exit 0
  • CI grün: middleware, web-ui, schema, audit (×2 Matrix)
  • Manuell: bash script/setup läuft lokal durch (middleware-/web-ui-npm install + core.hooksPath)
  • Nach Merge: Branch Protection auf main per API (separater Step)

Mark the repo as on-standards via .github/engineering-standards.yml
(status: applied, source: byte5ai/engineering-standards) and bring in
the missing pieces from the standards template:

- .hooks/pre-push blocks direct pushes to main/master; override via
  ALLOW_PUSH_TO_MAIN=1 for emergencies.
- script/setup wires core.hooksPath = .hooks and runs the two-workspace
  npm install. Mirrors the manual bootstrap in CONTRIBUTING.md.
- AGENTS.md gets a "Git Workflow & Engineering Standards" section
  (branch naming, conventional commits, no Co-Authored-By trailers
  for AI agents, no force-push, no --no-verify). The stale
  "Git gibt es aktuell nicht" line from 2026-04-19 is corrected to
  reflect the public GitHub release.
- CONTRIBUTING.md notes the pre-push guard in the verification block
  and bans Co-Authored-By trailers for AI agents in the PR workflow.

Branch protection on main is set separately via the GitHub API after
this PR merges, so CI status-check contexts are registered first.
@iret77
iret77 merged commit 3ca2712 into main May 17, 2026
@iret77
iret77 deleted the chore/engineering-standards branch May 17, 2026 01:00
Weegy added a commit that referenced this pull request Aug 28, 2026
… drawer (#917)

Clicking "Config" on a plugin attached to an orchestrator replaced the whole
page with the route error boundary ("Etwas ist schiefgelaufen").

Root cause: since #602 (OM-17) the manifest loader normalises every setup
field's `label` and `help` into a `{ <locale>: text }` map (`?? { en: key }`).
PluginsDnd still rendered `field.label` straight into JSX, which is React #31
("Objects are not valid as a React child (found: object with keys {en})"). It
threw on the first render after the drawer opened, so the error propagated to
app/error.tsx and took the orchestrator page down.

This was not an edge case: 192 of 192 setup fields across 27 plugins in the
live catalog are maps — not one ships a bare string. Every plugin with setup
fields was unconfigurable from the orchestrator page.

- PluginsDnd resolves label/help with `pickLocalized` (the same helper the
  store's setup form and credentials editor already use), falling back to the
  field key exactly as the loader does.
- `PluginSetupFieldDto` typed `label`/`help` as plain strings, which is what
  let the mismatch through typecheck; both are now `LocalizedMarkdown | string`.
- `pickLocalized` now returns a bare string as-is. Without that branch a
  payload from a pre-#602 middleware would fall through to
  `Object.values('abc')` and render 'a'.

Regression test drives the button and asserts the map resolves, the active
locale wins, a bare string still renders, and an empty map falls back to the
key. Reverting the render change fails three of the four with React #31.
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