Skip to main content
Version: 3.2.0

feat-auto-attributes

New Features​

Auto-attributes (Tower consumer — Phase 1)​

Tower deposits structured metadata to neo-backend as autoAttributes on each protected document (POST /v2/documents), replacing legacy tags from bcyip-toolkit.

Reference documentation: docs/auto-attributes.md — codes deposited, deposit-fields module, neo headers, storage tags. Update this doc when Tower behaviour changes.

Attributes sent by Tower (iptower):

CodeGitFTP
source-typegitlab, github, bitbucket, giteaftp
source-nameworkflow source name (config.name)workflow source name
git_reporemote repo (projectName)—
git_commitcommit SHA—
git_branchbranch (push only)—
git_tagtag (tag event only)—
ftp_source-path—folder path

bcyip:agent and bcyip:agent-version are injected by neo-backend (Bcyip-Agent, Bcyip-Version headers).

Implementation:

  • src/protocol/utils/deposit-fields.ts — single projection from ProtectTask to auto-attributes and storage path tags
  • src/app.service.ts — buildAutoAttributes(task) on git/FTP protect
  • src/protocol/bcyip/api.ts — createDocument(), Bcyip-Version header
  • src/protocol/storage/storage.service.ts — resolveStoragePath() / metadata from same deposit fields

Platform contract (catalogue, smart lists, folder filters): neo-backend docs/auto-attributes.md.

Breaking Changes​

Removed dependency on bcyip-toolkit​

Required enabler for auto-attributes: Tower calls neo-backend directly for document creation and proof download. Docker base image is now node:20-alpine instead of bcyip-toolkit:0.4.1.

  • hashFile(), createDocument(), downloadProof() in src/protocol/bcyip/api.ts
  • processHook, processFtp, processProof no longer shell out to the toolkit
  • test/helpers/neo-backend-mock.ts replaces bash mock test/mocks/bcyip-toolkit (nock HTTP mock for POST /documents, proof status, zip)

Technical Changes​

  • Proof status: GET /documents/:id/proofs/statuses on neo (was legacy backend)
  • Integration tests: neo-backend-mock.ts mocks neo HTTP (documents, proof status, zip, tower heartbeat/activate) and allows DinD service host (docker, SERVICE_HOST) for Gitea/MinIO