Commit graph

448 commits

Author SHA1 Message Date
Alexandre Brandizzi
af6faf77e3
Merge branch 'dev' into fix/SH-337-completion-doc-allowlist 2026-09-10 14:38:06 -03:00
Alexandre Brandizzi
6d58865253
Merge pull request #111 from Sea-Haven-Industries/fix/ab/deploy-verify-health-convergence
Some checks are pending
Validate and deploy / Validate deployable source bundle (push) Waiting to run
Validate and deploy / Deploy shoc-backend-dev through Terraform (push) Blocked by required conditions
Validate and deploy / Deploy shoc-backend-staging to Elastic Beanstalk (push) Blocked by required conditions
fix(deploy): let EB health converge before failing the version gate
2026-09-10 14:37:57 -03:00
Adam Moussa
e330599044
Merge branch 'dev' into fix/ab/deploy-verify-health-convergence 2026-09-10 11:11:41 -04:00
Alexandre Brandizzi
9a49a5c40a fix(deploy): apply the health-convergence fix to the dev Terraform rollback
The dev Terraform rollback verify was the one gate the previous commit
missed, and it is the copy that actually ran on 34293894914. It still
decided on the first Ready poll: previous version correctly restored,
health not yet converged, reported as a failed rollback.

Split the version and health conditions the same way the other three
gates now do — a Ready poll on the wrong version fails immediately and
names the version that came up, while the correct version with unsettled
health keeps polling inside the unchanged 80 x 15s budget. Timeout now
reports the last observed status, version and health.
2026-09-10 10:55:45 -03:00
Arthur Bassi
492478f815
Merge pull request #112 from Sea-Haven-Industries/feat/SH-186-status-auto-derivation
Some checks are pending
Validate and deploy / Validate deployable source bundle (push) Waiting to run
Validate and deploy / Deploy shoc-backend-dev through Terraform (push) Blocked by required conditions
Validate and deploy / Deploy shoc-backend-staging to Elastic Beanstalk (push) Blocked by required conditions
feat(work-orders): derive Scheduled from concrete Schedule On
2026-09-09 17:46:18 -03:00
Arthur Bassi
1e37fb486c Merge remote-tracking branch 'origin/dev' into feat/SH-186-status-auto-derivation 2026-09-09 17:34:00 -03:00
Arthur Bassi
815e17c56f
Merge pull request #109 from Sea-Haven-Industries/feat/SH-171-wo-documents
feat(work-orders): add authorized Extra Docs content GET
2026-09-09 17:33:04 -03:00
Arthur Bassi
e849991dcf test(work-orders): seed scheduled concurrency scenario 2026-09-09 17:09:26 -03:00
Arthur Bassi
3454125d2d fix(work-orders): address document review feedback 2026-09-09 17:09:26 -03:00
Arthur Bassi
cd34a23e78 Merge remote-tracking branch 'origin/dev' into feat/SH-186-status-auto-derivation 2026-09-09 10:24:15 -03:00
Arthur Bassi
8b4aec300f feat(work-orders): re-derive lifecycle when board status is patched
Scheduled still requires a concrete date, and Incomplete/Pending with a date must promote even when only lifecycleStatus is sent.
2026-09-09 10:23:22 -03:00
Alexandre Brandizzi
d1e3fb03ce fix(deploy): let EB health converge before failing the version gate
Elastic Beanstalk reports Ready as soon as a rollout finishes, before
enhanced health has converged. Both verification gates decided on the first
Ready poll, so a release whose version had activated correctly was failed on
a health value that had not settled yet — and then rolled back.

The failure message compounded it: run 34293894914 printed 'Environment
became Ready without activating expected version a0fdd199...' when the
active version was exactly a0fdd199... The discriminator was health, not
version, which sends whoever reads the log after the wrong problem.

Separate the two conditions, keep polling while the correct version is
active but health has not settled, and report the last observed state on
timeout. An environment that stays unhealthy for the full window still
fails; this does not widen what counts as a good deploy.
2026-09-08 21:31:55 -03:00
Alexandre Brandizzi
7e4db749d0 fix(work-orders): enforce a file allowlist on completion-doc upload (SH-337)
The completion-document endpoint persisted whatever file it received: the
only checks were non-null, non-empty, and a 30 MB request limit. Its sibling
media endpoint has enforced a MIME allowlist, MIME-to-extension pairing, and
a magic-byte signature check since SH-116.

Validate before the file reaches storage, so a rejected upload leaves nothing
behind. An undetermined content type is accepted only alongside a .pdf name
and a %PDF- signature, because the browser leaves File.type empty when the OS
cannot classify the file and the completion-doc dialog already allows that.
2026-09-08 21:24:10 -03:00
Arthur Bassi
a0fdd19934
fix(work-orders): accept image/jpg MIME and expose board MediaCount (#107)
Some checks are pending
Validate and deploy / Validate deployable source bundle (push) Waiting to run
Validate and deploy / Deploy shoc-backend-dev through Terraform (push) Blocked by required conditions
Validate and deploy / Deploy shoc-backend-staging to Elastic Beanstalk (push) Blocked by required conditions
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-09-09 00:10:52 +00:00
Arthur Bassi
12354f9bf7 test(work-orders): cover SH-186 schedule status derivation 2026-09-08 16:24:45 -03:00
Arthur Bassi
f3f9ac1b58 feat(work-orders): derive lifecycle on board create and schedule PATCH 2026-09-08 16:23:13 -03:00
Arthur Bassi
ae9122243d feat(work-orders): run schedule status side-effects on board field mutations 2026-09-08 16:22:11 -03:00
Arthur Bassi
e12b3ea54b feat(work-orders): apply schedule lifecycle promote and demote 2026-09-08 16:21:14 -03:00
Arthur Bassi
335390f746 feat(work-orders): derive Scheduled from date without assignee 2026-09-08 16:19:50 -03:00
Adam Moussa
1bdbc12292
fix(deploy): treat applied HCP runs as success (#108)
Some checks are pending
Validate and deploy / Validate deployable source bundle (push) Waiting to run
Validate and deploy / Deploy shoc-backend-dev through Terraform (push) Blocked by required conditions
Validate and deploy / Deploy shoc-backend-staging to Elastic Beanstalk (push) Blocked by required conditions
* fix(deploy): treat applied HCP runs as success

* fix(deploy): wait on rollback apply result

* fix(deploy): compare G3 formatting against the PR merge base

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(deploy): fence rollback create-run on unlock success

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 13:26:11 -04:00
Arthur Bassi
143d613547 test(work-orders): expect media content route 2026-09-08 11:25:26 -03:00
Arthur Bassi
9d8ae5ec24 feat(work-orders): add authorized media content GET 2026-09-08 11:23:52 -03:00
Arthur Bassi
b4f2c8b763 feat(work-orders): authorize WO media content reads 2026-09-08 11:19:41 -03:00
Arthur Bassi
a25fd0bd5d feat(work-orders): stream stored WO media safely 2026-09-08 11:09:55 -03:00
Arthur Bassi
bb651bb547 feat(work-orders): add file storage OpenRead port 2026-09-08 11:08:26 -03:00
Arthur Bassi
02df093798 feat(work-orders): align completion-doc size with Extra Docs 2026-09-08 11:07:17 -03:00
Arthur Bassi
b6b8d2e58f feat(work-orders): cap media uploads at 50MB 2026-09-08 11:06:05 -03:00
Arthur Bassi
47022c7761 feat(work-orders): allow Extra Docs PDF/DOC by category 2026-09-08 11:02:40 -03:00
Arthur Bassi
a5d1c85d53
Merge pull request #106 from Sea-Haven-Industries/feat/SH-170-wo-board-severity
Some checks are pending
Validate and deploy / Validate deployable source bundle (push) Waiting to run
Validate and deploy / Deploy shoc-backend-dev through Terraform (push) Blocked by required conditions
Validate and deploy / Deploy shoc-backend-staging to Elastic Beanstalk (push) Blocked by required conditions
feat(work-orders): persist board severity on create, patch, and search
2026-09-07 12:19:21 -03:00
Arthur Bassi
9a0d3fb74c fix(work-orders): copy persisted severity onto GET detail
EOF
2026-09-07 12:02:23 -03:00
Arthur Bassi
7a0b91bcd6 feat(work-orders): persist board severity on create, patch, and search 2026-09-07 11:46:13 -03:00
Alexandre Brandizzi
6ceb274bfb
feat: add API Sentry tracing (SH-298) (#105)
Some checks failed
Validate and deploy / Validate deployable source bundle (push) Has been cancelled
Validate and deploy / Deploy shoc-backend-dev through Terraform (push) Has been cancelled
Validate and deploy / Deploy shoc-backend-staging to Elastic Beanstalk (push) Has been cancelled
* feat: add API Sentry tracing

* feat: activate Sentry deployment environments

* fix: allow Sentry-free design-time tooling

* fix: trace background jobs in Sentry

* feat(observability): identify and scrub Sentry transactions

* fix(observability): finish abandoned transactions
2026-09-04 14:11:32 -03:00
Arthur Bassi
6d66737211
Merge pull request #104 from Sea-Haven-Industries/feat/sh-169-board-create-lifecycle
feat(work-orders): persist board create lifecycleStatus (SH-169)
2026-09-04 13:42:42 -03:00
Arthur Bassi
31b3c2bbd1
Merge branch 'dev' into feat/sh-169-board-create-lifecycle 2026-09-04 10:24:52 -03:00
Arthur Bassi
b7df5ef629 feat(work-orders): persist board create lifecycleStatus from the client 2026-09-03 13:36:22 -03:00
Adam Moussa
69ba573315
chore(terraform): remove tf-poc rehearsal (SH-300) (#95)
Some checks are pending
Validate and deploy / Validate deployable source bundle (push) Waiting to run
Validate and deploy / Deploy shoc-backend-dev through Terraform (push) Blocked by required conditions
Validate and deploy / Deploy shoc-backend-staging to Elastic Beanstalk (push) Blocked by required conditions
* chore(terraform): remove tf-poc rehearsal

* chore(terraform): drop tf-poc from live module and CI

* chore: clean remaining tf-poc reference from `shared_certificate_arn`
2026-09-03 10:40:32 -04:00
Adam Moussa
77c3016c9d
feat(deploy): move dev application CD through Terraform (#102)
Some checks are pending
Validate and deploy / Validate deployable source bundle (push) Waiting to run
Validate and deploy / Deploy shoc-backend-dev through Terraform (push) Blocked by required conditions
Validate and deploy / Deploy shoc-backend-staging to Elastic Beanstalk (push) Blocked by required conditions
* feat(deploy): move dev application CD through Terraform

GitHub creates the immutable Elastic Beanstalk version; HCP Terraform is the only UpdateEnvironment caller via a guarded version_label run.

* fix: add permissions block for dependency-review workflow

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix(terraform): stop pinning the generated dev instance SG

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-09-03 14:12:06 +00:00
Arthur Bassi
a0183fa44c
Merge pull request #103 from Sea-Haven-Industries/feat/sh-167-board-carry-over
feat(work-orders): include unresolved prior-week rows on GET board
2026-09-03 09:59:24 -03:00
Arthur Bassi
d75f78651b feat(work-orders): include unresolved prior-week rows on GET board 2026-09-02 09:49:56 -03:00
Arthur Bassi
5f6069547d
Merge pull request #100 from Sea-Haven-Industries/fix/sh-296-vendor-invalid-dispatch
fix(work-orders): accept linked primary dispatch on vendor board patch
2026-09-01 09:50:40 -03:00
Arthur Bassi
f15dde8b30 Merge branch 'fix/sh-296-vendor-invalid-dispatch' of https://github.com/Sea-Haven-Industries/shoc-backend into fix/sh-296-vendor-invalid-dispatch 2026-09-01 09:43:14 -03:00
Arthur Bassi
03c069d10d fix(work-orders): detach shared dispatch on vendor fork
Keep same-vendor saves idempotent and drop stale DispatchWorkOrders so listing and uplift follow the new primary.
2026-09-01 09:42:41 -03:00
Arthur Bassi
af27186527
Merge branch 'dev' into fix/sh-296-vendor-invalid-dispatch 2026-09-01 09:35:00 -03:00
Adam Moussa
6ef8e9ba2a
feat(terraform): complete dev environment adoption (SH-300) (#99)
* feat(terraform): complete dev environment adoption

* fix(terraform): preserve dev release permissions
2026-08-31 20:18:44 -03:00
Arthur Bassi
ca0404272e fix(work-orders): accept linked primary dispatch on vendor board patch
Vendor PATCH treated a GET-echoed id as foreign when belong-check used only WorkOrderId.
2026-08-31 15:48:33 -03:00
Adam Moussa
e1e547f7d0
fix(terraform): preserve live state during dev import (#98) 2026-08-31 15:05:46 -03:00
Arthur Bassi
9665be0ae5
Merge pull request #97 from Sea-Haven-Industries/fix/sh-131-clear-appt-time
fix(work-orders): persist empty apptTime as null scheduled instants
2026-08-31 14:24:50 -03:00
Arthur Bassi
ddd47f6d37
Merge branch 'dev' into fix/sh-131-clear-appt-time 2026-08-31 13:15:44 -03:00
Arthur Bassi
58dd5ec6ae
Merge pull request #96 from Sea-Haven-Industries/fix/user-list-full-display-name
fix(users): compose full Name on user list
2026-08-31 13:13:48 -03:00
Arthur Bassi
0822b50a82
Merge branch 'dev' into fix/user-list-full-display-name 2026-08-31 13:10:08 -03:00