# Native beta preparation —2026-11-24

Owner approved installing the requested packages, directed reuse of
`~/Projects/minci` and instructed looking up group names directly on the server.
This follows the existing owner-authorized commit → CI → native deployment
workflow, not an application-owned SSH deploy script.

## Corrected Minci inventory

The published Minci release80f778d110b871cb0ecde348507f5dfa7c1684a8 is already
installed on cdg-1, including the real deployment API. The older maa-1 copy is
not evidence that the production CI installation lacks this capability. Read
`~/.local/var/minci-releases/production-remote-20261123.kGdkFB6g/RESULT.md` and
verified the actual cdg-1 launcher/prefix. Do not install the unrelated current
sysroot-development checkout or modify its dirty README/tests.

A separate pinned80f778d runner/receiver prefix is installed on maa-1 under
`/opt/signet-minci/80f778d110b871cb0ecde348507f5dfa7c1684a8`, from the published
archive whose SHA256 is
`87241dc8337e95db00a10cd2c4d6c2025425233f2eff53d8dce7900a172f245b`.
This permits native Alpine builds without Debian-linked binaries or production
containers, and does not replace maa-1's old global runner.

Dedicated Minci project20 (`signet`) and producer `signet-ci@saikrupagas.com`
were enrolled on cdg-1 with a native SQLite transaction and a private pre-change
backup under `/root/signet-minci-enrollment-20261124/`. Only the dedicated new
producer's credentials were copied privately to the native runner; no existing
producer's credential was reused. Runner publication token is project/producer
bound, expires30days after creation, and stays outside source/run sandboxes.
Do not print or commit its value.

Native runner account/home: `signet-ci`, `/var/lib/signet-ci` (0700).
Receiver account/home: `signet-deploy`, `/var/lib/signet-deploy` (0700).
Named target `signet`, environment `beta`, release root `/srv/signet`.
SSH is loopback-only through an app-specific key restricted to the receiver
command; host key pinned from the existing local SSH host public key. No public
shell/password/forwarding grant. Policies are `/etc/minci-signet-targets` and
`/var/lib/signet-ci/deploy-targets`; wrapper is
`/usr/local/libexec/signet-minci-receiver`. The existing native remote receiver
uses BusyBox atomic rename, not the local vendor backend's Python fallback.

`.config/Jobfile` builds serially, runs service-free native group/command/image
contracts, packages with the existing Makefile and records `MINCI_REVISION`.
Actual application health/OpenRC/identity acceptance is separate from activation.
No namespace bootstrap or second build-system/orchestrator was introduced.

## Native provisioning and package exception

Approved hiredis-dev/libpng-dev/qpdf/poppler-utils are installed and qpdf12.3.2 /
pdfinfo25.12.0 run. Despite its earlier simulation, APK unexpectedly also tried
to install python3-ndbm and reported an ownership conflict with the installed
python3 package. The transaction returned an error even though requested packages
installed. No Python was invoked intentionally, forced overwrite/unrelated repair,
package removal or retry was performed. Do not report this as a clean full APK
transaction or imply that all Python-package effects were reversed. Host package
state requires separate careful inspection; this is not an application dependency.

New service accounts `signet` and `signetd` share only group `signet`.
Isolated database `signet` on the existing PostgreSQL18.7 service has separate
non-superuser login roles, owned by `signet`; the worker has only schema/table
permissions from the existing tested grant set. Empty schema, no demo users,
facsimiles or production documents seeded. Peer connection verified for both.

Private configuration: `/etc/signet/signet.conf`,0640 root:signet.
Data `/var/lib/signet`,2770 signet:signet; inbox1730 signetd:signet;
originals `/var/lib/signet-signatures`,0700 signetd:signet; readonly DAM
`/srv/files/signet`,0755 root:root. Redis is reserved at127.0.0.1:16379 with its
own persistent data/queue; not a shared database/FLUSHDB. Optional TSA remains
disabled. No system font found, so use the existing supported Helvetica fallback
rather than adding an unapproved font dependency.

Initial native account setup omitted Alpine's explicit primary-group option for
the two CI/deploy accounts; corrected immediately using dedicated groups and
native usermod before private files were installed. No other account changed.

## Server group lookup and source repair

Queried only group names from the existing LDAP database. Initial credential
probes accidentally included a trailing newline in the private password file,
causing49; this was a probe serialization error, NOT evidence of bad configured
credentials. Retested the existing Authelia bind with exact password bytes and
it succeeds. Anonymous group read was denied and no ldapi listener exists.
Before correcting the probe, native slapcat with a groupOfNames filter and group
subtree also obtained only cn values; private temporary output was deleted.
No LDAP user values/members/passwords were exported or changed. Slapcat emitted
preexisting unknown custom-attribute schema warnings; no schema edit was made.

Actual groups: Proprietor, Manager, Godown Supervisor, Counter Staff, Mechanic,
Delivery Staff, Janitor. Deployment mapping:

- drafter: Proprietor, Manager, Counter Staff
- signer: Proprietor, Manager
- admin/pim_admin: Proprietor only
- DAM writes denied

Found a security-relevant source issue: group parsing treated whitespace as a
separator, so shared words could grant an unintended role. Reproduced with a
failing native C assertion, fixed comma-separated exact matching with trimmed
item boundaries, and added both portable C and both-API identity regressions.
No hardcoded production group names were added to product logic.

## Native kcgi ABI repair and trust-boundary test

Native build originally used `/usr/local/include/kcgi.h` but linked the different
`/usr/lib/libkcgi.so.1.1`; an actual request returned503 allocation failure.
Preprocessor include tracing and ldd proved the mismatch. Makefile now asks
pkg-config for BOTH kcgi cflags and libraries, pairing the selected installation.
Fresh native build links `/usr/local/lib/libkcgi.so.1`; native requests then pass.
No installed libraries/headers or other application were replaced.

The installed lighttpd supports independent authorizer and responder maps in one
vhost. No Lua shim, new auth daemon or product authentication implementation is
needed. A loopback-only synthetic HTTP fixture exercised the actual installed
Authelia authorizer, lighttpd and both newly built FastCGI APIs with the actual
empty Signet DB. Manager/Proprietor/Counter Staff/Delivery Staff identities produce
exact expected roles in both APIs, anonymous requests redirect, and forged group
headers are denied. Synthetic identity never reached public routing or a real
SSO session. Fixture listeners18494/18495 were cleaned up and verified absent.

Preflight binaries/sockets are explicitly separate: `/opt/signet-preflight/`,
`/run/signet-native-{api,pim}.sock`; these are NOT activated production binaries.
The old kfcgi supervisor required bounded TERM/KILL cleanup in the fixture; this
was fixed and a clean rerun exited normally. Do not use unbounded waits in new
operational helpers.

## Verification checkpoint (before activation)

- Portable new group regression: red before fix, green after; shell syntax pass.
- Native x86_64 Alpine warning-clean build; group and command contracts pass.
- Actual native authorizer/responder fixture passes all eight role/API cases,
  anonymous redirect and forged-header denial.
- Full disposable Alpine image rebuild and E2E after both source fixes ends
  `all passed`. Latest image `signet-nativebeta-paired-20261124`, ID32e12d670aa1;
  owned test container on18098. Earlier owned group-only fixture on18097.
  Preserved user previews were not changed. This is NOT aggregate-resource20 or
  real browser/LDAP authentication acceptance.
- Pinned Minci POSIX helper syntax passes. Applying sh -n to the unmodified
  Bash-based vendor local backend was an invalid check and failed as expected;
  that backend was not executed. Remote delivery avoids its Python fallback.

## Actual Minci activation and live endpoint

- Deployed source commit **df5fafaf964008950dc0313e4a37e8c49a5fd017**, committed
  on `feat/native-beta-rollout`, fast-forwarded to main and pushed. Primary origin
  SHA independently verified; unrelated secondary GitHub mirror failure ignored.
- **Pipeline281**, project20, public pipeline status `success` at
  `https://ci.nply.org/api/v4/projects/20/pipelines/281`.
- Native run `/var/lib/signet-ci/.local/cache/minci/work/signet/runs/run.XXahoNeG`:
  state `activated`, revision exact, activation outcome `succeeded`.
- Actual deployment record1: status `success`, outcome `succeeded`, pre-outcome
  `not_requested`, target `signet`. Attempt
  `5f9b341c2a13c78204fd9e3fb7928e5027a03ae5d3d49a8e95e19f798263ac10`.
  Target state `succeeded`, acknowledged `yes`; no unknown outcome to resolve.
- Current link `/srv/signet/current` points to
  `releases/minci-5f9b341c2a13c78204fd9e3fb7928e5027a03ae5d3d49a8e95e19f798263ac10`.
  REVISION exact. Native-tested preflight and CI-activated API binary bytes compare
  equal. Subsequent evidence-only Git commits are not a redeployment claim.
- Native source origin was bootstrapped from an exact Git bundle of published
  main to `/var/lib/signet-ci/origin/signet.git`; the private runner selects this
  local origin. This is source input bootstrap, NOT copying binaries for manual
  activation. Minci performed the real build/check/package/delivery/publication.
  Automatic upstream fetch/webhooks are NOT configured: update this bare origin
  deliberately with a verified published Git bundle before a future selected
  run, or provision a separate read-only Git credential through normal Gitolite
  administration. Do not pretend the current mirror automatically follows Git.
- Only this producer's runner-publication token expires
  **2026-12-24 04:02:27 UTC**. Renew through the existing offline Minci token tool,
  retaining project20/producer binding and private file mode; never put it in Git.

## Live routing, lifecycle and recovery checks

Public URL **https://sign.saikrupagas.com/** now returns302 to real HTTPS SSO
with the correct HTTPS return URL. It no longer has the TLS failure or blanket403.
The app/static/API/PIM/DAM GET routes all require SSO. `/auth/user` is401 when
anonymous on this actual installed authorizer (older shared notes said403).

Backend vhost `/etc/lighttpd/vhosts.d/sign.saikrupagas.com.conf` uses independent
FastCGI authorizer/responder maps, real shared authorizer socket, private API/PIM
sockets, immutable release webroot and the source request-size limits. Proxy
`/etc/lighttpd/signet-proxy.conf` replaces the old pending include. Both reject
client identity copies; public tests reject eight header variants, including
underscore CGI aliases, with403. No Lua/auth bridge or new auth runtime added.
DAM is static read-only; PUT/DELETE/MKCOL/PROPFIND all403. No mod_webdav write
handler is enabled for Signet. CSP is the existing application policy.

Authelia change is one new `sign.saikrupagas.com` one_factor rule; existing
policies/credential bytes unchanged. Native config validation passes, with
preexisting LDAP-deprecation/plain-local-SMTP warnings. Authelia's restart also
restarted its dependent authorizer. Immediate readiness initially returned500;
the public reservation remained closed. After real health/redirect readiness,
only then activated public routing. The saved bootstrap helper now has bounded
readiness retries; no bypass/repeated Minci activation was used.

Scoped routing/config backup: `/root/signet-native-routing-20261124/` on maa-1.
It includes pre-change Authelia/proxy/backend configs privately. Both lighttpd
configs and monit validate. Existing SSO200 / Ops302 / Regi302 still pass TLS
checks after routing and the lifecycle rehearsal. Unrelated existing im-domain
expired certificate warning remains untouched.

OpenRC services `signet-api`, `signet-pim`, `signetd`, `signet-redis` are running
and registered at default runlevel; supervise-daemon owns bounded respawn/stop.
Runtime binaries come from the exact Minci current release. Initial startup
exposed two provisioning issues, now corrected: the Minci releases parent was700
so other service users could not traverse it (changed only that public-code
parent to755), and privilege-dropped Redis/worker needed to own their private600
log files. No immutable release file bytes/modes were altered. Logs are under
`/var/log/signet*.log`; `/etc/logrotate.d/signet` has daily/1MiB rotation, seven
retained generations, compression/copytruncate. Scoped logrotate dry-run passes.
Persistent native LOCAL0 capture remains a separate26 gate; stderr files are
not claimed as proof of that syslog boundary.

Redis uses127.0.0.1:16379, own700 data directory, AOF `yes`/everysec. All four
services completed a coordinated stop/start. A short-lived owned sentinel
survived Redis restart and was deleted afterward. No shared Redis configuration,
queue/foreign keys or application data was flushed.

Initial coordinated private backup is `/root/signet-backups/initial-20261124/`:
quiesced API/PIM/worker/Redis, PG custom-format dump, private files/config/DAM/AOF,
current-link/revision and SHA256s. A new private restore-check database restored
without errors, has0 documents and correct worker UPDATE permission, then only
that check database was dropped. Extracted file backup matches config bytes and
restores originals700/inbox1730. Original database/data were NOT restored,
rewound or dropped. This is an **initial empty-database rehearsal**, not evidence
for populated histories, facsimiles, pending revisions or whole-host recovery.
Application services resumed even on backup-check exit paths.

API OS user cannot read/traverse originals or write the immutable release;
web user cannot read private Signet config/originals; worker can read its config
and access originals. All owned preflight supervisors/listeners were stopped;
only runtime services remain. Both owned disposable development containers are
stopped/retained; preserved user previews untouched. Local test logs/helpers live
under ignored `out/public-endpoint/`; no credentials are stored there.

Idle native core application plus its own OpenRC/kfcgi supervisors sampled
**19028KiB**. This excludes shared lighttpd/PostgreSQL and infrastructure Redis,
is NOT a peak/mixed-workload certificate, and does not close20 or waive60MB.

The unexpected APK conflict is recorded precisely: `python3-ndbm` has an empty
installed file list after the failed attempt; the original `_dbm` shared object
is still owned by `python3-3.14.10-r1`. No Python was run, no overwrite forced,
and no unrelated uninstall/repair attempted. Host administrator should inspect
that package-manager state separately; all approved Signet packages and native
build/CI/runtime checks pass.

## Remaining acceptance

Keep14/20/24–29 and session task17 open for their remaining actual criteria.
**Real human browser/LDAP login, browser CSP/pdf.js/signing, and an actual native
create→submit→sign→release smoke are not claimed** from redirects or synthetic
identity tests. No real facsimiles/documents or synthetic signing records were
seeded in the live database. Populated backup/restore, broader native coexistence,
resource20 and PDF/font edges also remain open. Optional TSA stays disabled.

Routine diagnosis: use `rc-service signet-{api,pim,redis} status` and
`rc-service signetd status`, private logs, the exact Minci receipts above, and
`sh out/public-endpoint/check.sh` for public auth/denied-method regression checks.
Rollback/maintenance: close only Signet at the proxy using the retained pending
reservation, validate/gracefully restart, inspect current processes/outcomes and
private backups, and follow the matching Minci manual recovery contract. Do not
restore the application DB after user writes merely to switch code; do not clear
fences or overwrite shared Authelia configs with stale backups.
