Fix pending Writer migration syntax and adopt simple Development handover
This commit is contained in:
parent
e086250a9d
commit
fb56794224
106
AGENTS.md
106
AGENTS.md
@ -63,13 +63,13 @@ Parallel tool calls are useful for latency but must not be used to load large am
|
||||
|
||||
Use the shared `PlotDirector.toast` service for transient feedback. See `Docs/Codex/Notifications.md` for the API, partial-view usage, and messages that must remain inline. Do not introduce another notification library or page-specific toast host.
|
||||
|
||||
## Build And Test
|
||||
## Build And Optional Tests
|
||||
|
||||
Normal build gate:
|
||||
Build:
|
||||
|
||||
dotnet build PlotLine.slnx
|
||||
|
||||
Full regression harness:
|
||||
Optional regression harness:
|
||||
|
||||
dotnet run --project PlotLine.Tests/PlotLine.Tests.csproj
|
||||
|
||||
@ -140,89 +140,27 @@ preferences, Data Protection identity, uploads, SQL, subscriptions and users per
|
||||
|
||||
Help front matter must explicitly declare visibility: public, administrator or internal. Public publication includes only public. Administrator help requires the existing AdminOnly policy in the application. Generate separate public/application audience artifacts; never select an application artifact for the website. Missing classifications fail closed.
|
||||
|
||||
## CYJ development worker
|
||||
|
||||
This repository uses the **application** worker, CYJ resource **7** in PlotDirector
|
||||
organisation 1. Run the shared toolkit from this repository, without changing its
|
||||
development/branching/testing/deployment procedures:
|
||||
## Development workflow
|
||||
|
||||
```sh
|
||||
/home/nick/cyj-planner/scripts/cyj-worker --worker application verify
|
||||
/home/nick/cyj-planner/scripts/cyj-worker --worker application available
|
||||
/home/nick/cyj-planner/scripts/cyj-worker --worker application waiting
|
||||
/home/nick/cyj-planner/scripts/cyj-worker --worker application task TASK_ID
|
||||
```
|
||||
Owner policy, 6 December 2026: claim eligible work, implement, build successfully, deploy to
|
||||
Development where applicable, confirm the application is running, complete the development
|
||||
task with changes and known limitations, then proceed automatically to the next eligible task.
|
||||
The owner performs functional acceptance and decides readiness for Production.
|
||||
|
||||
Read `/home/nick/cyj-planner/WORKERS.md` for the command reference, payloads and full
|
||||
workflow; use command `--help` for exact arguments. The toolkit loads only
|
||||
`~/.config/cyj/credentials/application.key` and verifies resource 7 before task
|
||||
operations. Never use planner/other-worker credentials or display secrets/state files.
|
||||
Automated tests and browser automation are optional unless explicitly requested by the owner
|
||||
for that task. A missing optional scenario, failed optional diagnostic or missing evidence format
|
||||
does not block handover. Report limitations honestly; never invent a pass or conceal a build,
|
||||
deployment, security or data-integrity failure. Reuse a healthy active release containing the
|
||||
actual task implementation commits; unrelated newer HEAD is not a deployment prerequisite.
|
||||
|
||||
Execute only work assigned to resource 7. Retrieve the full brief before claiming;
|
||||
claim only when ready. Review requirements against this file, then explicitly start
|
||||
InProgress. Use exact task ETags and a distinct persisted key per logical write.
|
||||
Renew the 15-minute claim every five minutes, before lengthy commands and on session
|
||||
resumption; short-yield long-running tools so renewal remains possible. No background
|
||||
heartbeat exists: if control cannot return before expiry, pause/split the work. Stop
|
||||
at expiry, reconcile and reacquire when eligible; never blindly repeat external effects.
|
||||
The Agent owns claims/renewal, Actual timing, deployment requests and CYJ completion. A provider
|
||||
implements and uses its scoped exchange; it never reads controller credentials/state or calls
|
||||
CYJ itself. Resolve ordinary technical failures from sanitised diagnostics. Withdraw only your
|
||||
own obsolete unanswered technical questions through the supported request operation. Genuine
|
||||
owner decisions, dependencies and uncertain effects remain protected.
|
||||
|
||||
Report progress; request human assistance for genuine blockers, instruction conflicts
|
||||
or unauthorised destructive actions. Record factual time and release while awaiting a
|
||||
human. Read the response, explicitly evaluate it if required, recheck eligibility and
|
||||
reclaim before resuming. Never bypass dependencies or release restrictions. Workers
|
||||
cannot correct estimates through execution endpoints: propose corrections to the planner.
|
||||
Do not independently edit deadlines, dependencies, assignments or resource calendars.
|
||||
|
||||
Implement and verify against the complete brief and existing repository gates. Record
|
||||
commits, real test outcomes, artifacts/result links, limitations and actual time before
|
||||
completion. Do not complete unfinished/unverified required work. Deployment requires
|
||||
the task's explicit scope and the existing repository procedure; it is not automatic.
|
||||
For uncertain writes use `retry ORIGINAL_KEY`, not a new key; reread/reconcile stale
|
||||
ETags and expired claims using WORKERS.md. Do not create/claim tasks merely to test setup.
|
||||
|
||||
## CYJ automatic controller claim ownership
|
||||
|
||||
For automatic `application` executions launched by `cyj-controller.service`, the
|
||||
controller acquires the claim and renews it every four minutes independently of
|
||||
Codex. This overrides the manual claim/renewal/no-heartbeat instructions above for
|
||||
controller-launched executions only. Do not acquire or renew a competing claim,
|
||||
including through retry. Retrieve and review the complete brief and responses,
|
||||
verify the inherited lease, then explicitly start InProgress. Complete or release
|
||||
normally; exit after blocking assistance. Stop/reconcile on lost ownership.
|
||||
Read `/home/nick/cyj-planner/CONTROLLER.md` for recovery, emergency stop and authority.
|
||||
Manual sessions retain their existing claim maintenance responsibilities.
|
||||
|
||||
## Unattended Development acceptance
|
||||
|
||||
Development deployment is required before CYJ user acceptance readiness, except
|
||||
where the brief explicitly defines a later acceptance milestone. After testing and
|
||||
committing, follow `Docs/Codex/Deployment.md` and the shared toolkit's `DEPLOYMENT.md`.
|
||||
In a controller execution use `deployment-request` / `deployment-result` for the
|
||||
configured `application-development` target. Never bypass no_new_privs or expose
|
||||
signing keys. Verify the deployed full commit, perform the brief's live acceptance
|
||||
(including genuine database persistence/reload), then record receipt, tests, feature
|
||||
URL and factual effort in CYJ before completion. Reconcile uncertain deployment
|
||||
outcomes before retrying. Production remains separately authorised.
|
||||
|
||||
## Authenticated Development browser acceptance
|
||||
|
||||
Use `Docs/Codex/BrowserAcceptance.md` and `Tools/BrowserAcceptance/run.py` for the
|
||||
permanent Application-only Development writer identity. Import the reusable
|
||||
`PlotLine.Tests/Browser/dev-acceptance.cjs` helper; authenticate normally, create a
|
||||
unique registered disposable project, test actual UI and server persistence after
|
||||
reload/fresh login, then clean up via the ordinary scoped project lifecycle. Never
|
||||
print credentials, record login traces/storageState, target Production or use SQL/
|
||||
sudo for routine browser fixtures. Preserve pending run journals and use documented
|
||||
resume cleanup on failure. Report deployed commit, URLs, actual checks, cleanup and
|
||||
limitations in CYJ; task-specific acceptance must still be performed by its worker.
|
||||
|
||||
## Standing automatic Development authority (2 December 2026)
|
||||
|
||||
Routine Development .NET, stored procedure/function, schema and data migrations are
|
||||
automatically authorised, including multiple corrective deployments in one controller
|
||||
execution. Use the installed controller-mediated mechanism documented in
|
||||
`Docs/Deployment/AutomaticDevelopment.md`. No individual operator SQL approval or new
|
||||
worker execution is required. `failed_safe` results permit correction/new request;
|
||||
uncertain live effects require reconciliation. Preserve applied hashes and migration
|
||||
ordering. Functional owner acceptance remains separate. Production always needs
|
||||
explicit owner approval and is unavailable through this Development path.
|
||||
Keep authentication, organisation/credential isolation, exclusive ownership, repository locks,
|
||||
process/secret isolation, applied migration hashes and necessary backup/recovery. Do not run
|
||||
source/build/dependencies as administrator. Use installed reviewed deployment routes. Development
|
||||
authority is not Production approval. Explicit owner approval remains required for Production.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
> Current owner policy (6 December 2026): implement, build, deploy Development, confirm running,
|
||||
> complete and continue. Automated/browser tests and qualification are optional unless requested.
|
||||
> Preserve security, migration integrity, recovery and explicit Production approval.
|
||||
|
||||
# Unattended authenticated Development acceptance
|
||||
|
||||
The Application worker has a permanent dedicated ordinary writer identity in
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
> Current owner policy (6 December 2026): implement, build, deploy Development, confirm running,
|
||||
> complete and continue. Automated/browser tests and qualification are optional unless requested.
|
||||
> Preserve security, migration integrity, recovery and explicit Production approval.
|
||||
|
||||
# PlotDirector Specialist Testing
|
||||
|
||||
Read this document when the change requires specialist testing beyond the normal build and regression harness.
|
||||
|
||||
@ -36,7 +36,10 @@ BEGIN
|
||||
WHERE parent_object_id = OBJECT_ID('dbo.WriterPlannedActivities')
|
||||
AND parent_column_id = COLUMNPROPERTY(OBJECT_ID('dbo.WriterPlannedActivities'), 'Status', 'ColumnId'));
|
||||
IF @OldStatusConstraint IS NOT NULL
|
||||
EXEC (N'ALTER TABLE dbo.WriterPlannedActivities DROP CONSTRAINT ' + QUOTENAME(@OldStatusConstraint));
|
||||
BEGIN
|
||||
DECLARE @DropStatusConstraint nvarchar(max) = N'ALTER TABLE dbo.WriterPlannedActivities DROP CONSTRAINT ' + QUOTENAME(@OldStatusConstraint);
|
||||
EXEC sys.sp_executesql @DropStatusConstraint;
|
||||
END;
|
||||
ALTER TABLE dbo.WriterPlannedActivities ADD CONSTRAINT CK_WriterPlannedActivities_Status
|
||||
CHECK (Status IN ('Planned', 'Done', 'Skipped'));
|
||||
END;
|
||||
|
||||
@ -70,7 +70,17 @@ def main():
|
||||
def build(command, log, writable):
|
||||
RESULT['phase'] = 'contained-publish'
|
||||
from sandbox_build import run_build
|
||||
run_build(command, source, writable, log)
|
||||
try:
|
||||
run_build(command, source, writable, log)
|
||||
except Exception:
|
||||
diagnostics=[]
|
||||
for line in Path(log).read_text(errors='replace')[-131072:].splitlines():
|
||||
match=re.search(r'([A-Za-z0-9_.-]+\.cs)\((\d+),\d+\): error ([A-Z]{2,8}\d{3,6}):',line)
|
||||
if match:
|
||||
finding={'category':match[3],'file':match[1],'line':int(match[2])}
|
||||
if finding not in diagnostics: diagnostics.append(finding)
|
||||
RESULT['build_diagnostics']=diagnostics[:30]
|
||||
raise
|
||||
proof = output/'evidence/development-automatic.json'
|
||||
if proof.exists() and command[1] == 'publish':
|
||||
data = load(proof)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user